aboutsummaryrefslogtreecommitdiff
path: root/mardown/lexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'mardown/lexer.go')
-rw-r--r--mardown/lexer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/mardown/lexer.go b/mardown/lexer.go
index 42519e7..62978ab 100644
--- a/mardown/lexer.go
+++ b/mardown/lexer.go
@@ -5,7 +5,8 @@ import "fmt"
type lexerType string
const (
- lexerBreak lexerType = "break"
+ lexerBreak lexerType = "break"
+ lexerEscape lexerType = "escape"
lexerModifier lexerType = "modifier"
lexerCode lexerType = "code"
@@ -75,6 +76,8 @@ func lex(s string) *lexers {
fn(c, lexerQuote)
case '[', ']', '(', ')', '!':
fn(c, lexerExternal)
+ case '\\':
+ fn(c, lexerEscape)
default:
fn(c, lexerLiteral)
}