if not token isa TokenLink then return token
if pos + 1 < text.length then
var c = text[pos + 1]
- if c == '[' then return new TokenWikiLink(pos, c)
+ if c == '[' then return new TokenWikiLink(token.location, pos, c)
end
return token
end
redef class Decorator
# Renders a `[[wikilink]]` item.
- fun add_wikilink(v: MarkdownEmitter, link: Text, name, comment: nullable Text) do
+ fun add_wikilink(v: EMITTER, link: Text, name, comment: nullable Text) do
if name != null then
v.add "[[{name}|{link}]]"
else
pos += 1
pos = md.skip_spaces(pos)
if pos < start then return -1
- pos += 1
return pos
end
end