From f179840fb9849b9612bed972c10b28fb4f5bd65a Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Wed, 5 Jul 2023 13:28:35 -0400 Subject: [PATCH] more escape test cases --- lexer_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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]]`,