From 3bdb7b53e35d7577efe696c37e3bb8216fb28a07 Mon Sep 17 00:00:00 2001 From: Geon George Date: Sun, 23 Feb 2020 09:27:20 +0530 Subject: [PATCH] fix(compiler): Better whitespace regex --- src/compiler/create-compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/create-compiler.js b/src/compiler/create-compiler.js index 67d2057adf9..dc1472f5487 100644 --- a/src/compiler/create-compiler.js +++ b/src/compiler/create-compiler.js @@ -21,7 +21,7 @@ export function createCompilerCreator (baseCompile: Function): Function { if (options) { if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) { // $flow-disable-line - const leadingSpaceLength = template.match(/^\s*/)[0].length + const leadingSpaceLength = template.match(/^[ \f\t\r\n]*/)[0].length warn = (msg, range, tip) => { const data: WarningMessage = { msg }