diff --git a/src/Framework/Framework/Compilation/Parser/Dothtml/Tokenizer/DothtmlTokenizer.cs b/src/Framework/Framework/Compilation/Parser/Dothtml/Tokenizer/DothtmlTokenizer.cs index 1f44e55897..6b3fe1f0e9 100644 --- a/src/Framework/Framework/Compilation/Parser/Dothtml/Tokenizer/DothtmlTokenizer.cs +++ b/src/Framework/Framework/Compilation/Parser/Dothtml/Tokenizer/DothtmlTokenizer.cs @@ -227,7 +227,14 @@ private ReadElementType ReadElement(bool wasOpenBraceRead = false) if (!char.IsLetterOrDigit(firstChar) & firstChar != '/' & firstChar != ':') { - CreateToken(DothtmlTokenType.Text, errorProvider: t => CreateTokenError(t, "'<' char is not allowed in normal text")); + if (char.IsWhiteSpace(firstChar)) + { + CreateToken(DothtmlTokenType.Text); + } + else + { + CreateToken(DothtmlTokenType.Text, errorProvider: t => CreateTokenError(t, "'<' char is not allowed in normal text")); + } return ReadElementType.Error; } diff --git a/src/Framework/Framework/Diagnostics/CompilationDiagnostic.dotcontrol b/src/Framework/Framework/Diagnostics/CompilationDiagnostic.dotcontrol index d76471315c..dfaab7490c 100644 --- a/src/Framework/Framework/Diagnostics/CompilationDiagnostic.dotcontrol +++ b/src/Framework/Framework/Diagnostics/CompilationDiagnostic.dotcontrol @@ -2,7 +2,7 @@
{{value: LineNumber}}: {{value: SourceLinePrefix}}{{value: SourceLineHighlight}}{{value: SourceLineSuffix}}