Skip to content

Commit

Permalink
export escapeChars as parser.EscapeChars (fixes #316)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Sep 30, 2024
1 parent 034f12a commit 7e0a027
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser/inline.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ func leftAngle(p *Parser, data []byte, offset int) (int, ast.Node) {
}

// '\\' backslash escape
var escapeChars = []byte("\\`*_{}[]()#+-.!:|&<>~^$")
var EscapeChars = []byte("\\`*_{}[]()#+-.!:|&<>~^$")

func escape(p *Parser, data []byte, offset int) (int, ast.Node) {
data = data[offset:]
Expand All @@ -753,7 +753,7 @@ func escape(p *Parser, data []byte, offset int) (int, ast.Node) {
return 2, &ast.Hardbreak{}
}

if bytes.IndexByte(escapeChars, data[1]) < 0 {
if bytes.IndexByte(EscapeChars, data[1]) < 0 {
return 0, nil
}

Expand Down

0 comments on commit 7e0a027

Please sign in to comment.