feat: with & for in render tag, closes #195

This commit is contained in:
harttle
2020-03-04 07:08:54 +08:00
parent aa27a6cd7b
commit 6ea6881f08
67 changed files with 1108 additions and 724 deletions
+2 -2
View File
@@ -28,12 +28,12 @@ function trimLeft (token: Token, greedy: boolean) {
if (!token || !HTMLToken.is(token)) return
const rLeft = greedy ? /\s+$/g : /[\t\r ]*$/g
token.value = token.value.replace(rLeft, '')
token.content = token.content.replace(rLeft, '')
}
function trimRight (token: Token, greedy: boolean) {
if (!token || !HTMLToken.is(token)) return
const rRight = greedy ? /^\s+/g : /^[\t\r ]*\n?/g
token.value = token.value.replace(rRight, '')
token.content = token.content.replace(rRight, '')
}