diff --git a/lexer_test.go b/lexer_test.go index 5f8b6a5..6034657 100644 --- a/lexer_test.go +++ b/lexer_test.go @@ -28,6 +28,24 @@ var wikilinkWithEscapeCharacters = []tc{ {Typ: markdown.LexCloseLink, Val: "]]"}, }, }, + { + name: "wikilink with escaped open link", + in: `[[wiki\[\[link]]`, + expected: []markdown.Lexeme{ + {Typ: markdown.LexOpenLink, Val: "[["}, + {Typ: markdown.LexIdent, Val: `wiki\[\[link`}, + {Typ: markdown.LexCloseLink, Val: "]]"}, + }, + }, + { + name: "wikilink with partial escaped open link", + in: `[[wiki\[link]]`, + expected: []markdown.Lexeme{ + {Typ: markdown.LexOpenLink, Val: "[["}, + {Typ: markdown.LexIdent, Val: `wiki\[link`}, + {Typ: markdown.LexCloseLink, Val: "]]"}, + }, + }, { name: "wikilink with escaped alias", in: `[[wiki\|link]]`,