Skip to content

Commit

Permalink
🎨 Vditor 支持
Browse files Browse the repository at this point in the history
反斜杠 \ 转义问题
Fix Vanessa219/vditor#501
  • Loading branch information
88250 committed Jun 23, 2020
1 parent 5b090f8 commit 2d5ab5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parse/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ package parse

import (
"bytes"

"github.com/88250/lute/ast"
"github.com/88250/lute/lex"
"github.com/88250/lute/util"
Expand Down Expand Up @@ -65,7 +66,7 @@ func (t *Tree) parseBackslash(block *ast.Node, ctx *InlineContext) *ast.Node {
tokens := ctx.tokens[ctx.pos:]
caret := []byte(util.Caret)
if len(caret) < len(tokens) && bytes.HasPrefix(tokens, caret) {
ctx.pos+= len(caret)
ctx.pos += len(caret)
token = ctx.tokens[ctx.pos]
ctx.pos++
n := &ast.Node{Type: ast.NodeBackslash}
Expand Down

0 comments on commit 2d5ab5d

Please sign in to comment.