|
|
@ -11,7 +11,16 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
var wikilinkWithEscapeCharacters = []tc{
|
|
|
|
var wikilinkWithEscapeCharacters = []tc{
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: "wikilink",
|
|
|
|
name: "wikilink with escaped close 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 close link",
|
|
|
|
in: `[[wiki\]link]]`,
|
|
|
|
in: `[[wiki\]link]]`,
|
|
|
|
expected: []markdown.Lexeme{
|
|
|
|
expected: []markdown.Lexeme{
|
|
|
|
{Typ: markdown.LexOpenLink, Val: "[["},
|
|
|
|
{Typ: markdown.LexOpenLink, Val: "[["},
|
|
|
@ -19,6 +28,42 @@ var wikilinkWithEscapeCharacters = []tc{
|
|
|
|
{Typ: markdown.LexCloseLink, Val: "]]"},
|
|
|
|
{Typ: markdown.LexCloseLink, Val: "]]"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "wikilink with escaped alias",
|
|
|
|
|
|
|
|
in: `[[wiki\|link]]`,
|
|
|
|
|
|
|
|
expected: []markdown.Lexeme{
|
|
|
|
|
|
|
|
{Typ: markdown.LexOpenLink, Val: "[["},
|
|
|
|
|
|
|
|
{Typ: markdown.LexIdent, Val: `wiki\|link`},
|
|
|
|
|
|
|
|
{Typ: markdown.LexCloseLink, Val: "]]"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "wikilink with escaped blockref",
|
|
|
|
|
|
|
|
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 blockref",
|
|
|
|
|
|
|
|
in: `[[wiki\^link]]`,
|
|
|
|
|
|
|
|
expected: []markdown.Lexeme{
|
|
|
|
|
|
|
|
{Typ: markdown.LexOpenLink, Val: "[["},
|
|
|
|
|
|
|
|
{Typ: markdown.LexIdent, Val: `wiki\^link`},
|
|
|
|
|
|
|
|
{Typ: markdown.LexCloseLink, Val: "]]"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "wikilink with escaped header",
|
|
|
|
|
|
|
|
in: `[[wiki\#link]]`,
|
|
|
|
|
|
|
|
expected: []markdown.Lexeme{
|
|
|
|
|
|
|
|
{Typ: markdown.LexOpenLink, Val: "[["},
|
|
|
|
|
|
|
|
{Typ: markdown.LexIdent, Val: `wiki\#link`},
|
|
|
|
|
|
|
|
{Typ: markdown.LexCloseLink, Val: "]]"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var singleWikilink = []tc{
|
|
|
|
var singleWikilink = []tc{
|
|
|
|