Support having new line and other whitespace after include filename (#834)

This commit is contained in:
Loo Rong Jie
2025-11-11 13:58:12 +08:00
committed by GitHub
parent 8686876067
commit 955b7971c0
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -422,7 +422,7 @@ export class Tokenizer {
* readFileNameTemplate (options: NormalizedFullOptions): IterableIterator<TopLevelToken> {
const { outputDelimiterLeft } = options
const htmlStopStrings = [',', ' ', outputDelimiterLeft]
const htmlStopStrings = [',', ' ', '\r', '\n', '\t', outputDelimiterLeft]
const htmlStopStringSet = new Set(htmlStopStrings)
// break on ',' and ' ', outputDelimiterLeft only stops HTML token
while (this.p < this.N && !htmlStopStringSet.has(this.peek())) {