Knagis/CommonMark.NET

AST Inline Blocks: LiteralContent empty for links and images

Closed this issue · 2 comments

LiteralContent for links and images in the AST are empty. Docs say it should have the title.

I want to highlight only the url portion of the link.

It would be useful to know the source offset of the actual link, but it can be inferred provided the LiteralContent property is empty for autolinks.

First, very sorry for the huge wait...
Second, I could not reproduce the problem - see the AST when [a](/b "c") (where "c" is the link title) is parsed:

debug view

Thanks for getting back to me. Haven't looked at this in a while but found
that I could get the literal content from the first child node. Wasn't in
the Link node as you show but maybe something has changed since then. I'll
check again.

The literal content might not be enough. It's been a while, but I came way
thinking I needed the start and end positions as well. The eventual goal is
to highlight the brackets and link in one color the literal content in
another color. I'll go back and review the issue to see where I was
stumped.

On Fri, Jun 26, 2015 at 3:29 PM, Kārlis Gaņģis notifications@github.com
wrote:

First, very sorry for the huge wait...
Second, I could not reproduce the problem - see the AST when a
(where "c" is the link title) is parsed:

[image: debug view]
https://cloud.githubusercontent.com/assets/8700285/8385675/a83caee4-1c52-11e5-8049-ff5685533875.png


Reply to this email directly or view it on GitHub
#37 (comment)
.