瀏覽代碼

Fix lexer

master
Dylan Baker 7 年之前
父節點
當前提交
d746573773
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/lexer.js

+ 1
- 1
src/lexer.js 查看文件

27
         })
27
         })
28
         pos++
28
         pos++
29
       } else if (source[pos].match(/:/)) {
29
       } else if (source[pos].match(/:/)) {
30
-        let value = /:([^()'"\s]+)/.exec(source)[1].trim()
30
+        let value = /:([^()'"\s]+)/.exec(source.slice(pos))[1].trim()
31
         tokens.push({
31
         tokens.push({
32
           type: tokenTypes.ATTRIBUTE,
32
           type: tokenTypes.ATTRIBUTE,
33
           line: line,
33
           line: line,

Loading…
取消
儲存