more escape test cases

main
Nick Dumas 1 year ago
parent be33bd2c20
commit f179840fb9

@ -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]]`,

Loading…
Cancel
Save