parseInlineLink function
Parses a link starting at start
.
The link can be in two form: '' or (link)
.
The second form can have an optional title, i.e., it is part of
markdown's link.
For example, to parse the link in [foo](link "title")
, pass start
points at (
.
The returned end
points at the character right after )
Implementation
({InlineLink link, int end})? parseInlineLink(String source, int start) {
final parser = SimpleInlineParser(source)..pos = start;
final link = LinkSyntax._parseInlineLink(parser);
if (link != null) return (link: link, end: parser.pos + 1);
return null;
}