fix: raw block not ignoring {% characters, fixes #263

This commit is contained in:
harttle
2020-12-08 00:12:20 +08:00
parent c8afa39a01
commit a492d8e23d
24 changed files with 153 additions and 81 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { VARIABLE } from '../util/character'
import { IDENTIFIER } from '../util/character'
const trie = {
a: { n: { d: { end: true, needBoundary: true } } },
@@ -19,6 +19,6 @@ export function matchOperator (str: string, begin: number, end = str.length) {
if (node['end']) info = node
}
if (!info) return -1
if (info['needBoundary'] && str.charCodeAt(i) & VARIABLE) return -1
if (info['needBoundary'] && str.charCodeAt(i) & IDENTIFIER) return -1
return i
}