From d06dcc202f3fe7f5a577494facbd33965fff2b92 Mon Sep 17 00:00:00 2001 From: thekevinhunt <71470205+thekevinhunt@users.noreply.github.com> Date: Wed, 3 Mar 2021 16:26:01 -0600 Subject: [PATCH] Fix to address #3263 for "in" usage I was still hitting issue #3263 when using "in" instead of "of" (which caused other odd problems). The regex was looking for * (0+) spaces instead of + (at least one) space. Using + instead prevents the regex from catching "in ofxxxxx". --- packages/pug-lexer/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pug-lexer/index.js b/packages/pug-lexer/index.js index d2d1e11d6..b4894a27b 100644 --- a/packages/pug-lexer/index.js +++ b/packages/pug-lexer/index.js @@ -1087,7 +1087,7 @@ Lexer.prototype = { eachOf: function() { var captures; - if ((captures = /^(?:each|for) (.*?) of *([^\n]+)/.exec(this.input))) { + if ((captures = /^(?:each|for) (.*?) of +([^\n]+)/.exec(this.input))) { this.consume(captures[0].length); var tok = this.tok('eachOf', captures[1]); tok.value = captures[1];