commonmark-java icon indicating copy to clipboard operation
commonmark-java copied to clipboard

LinkReferenceDefinition has null sourceSpans if title included

Open tjpalmer opened this issue 2 years ago • 0 comments

Steps to reproduce the problem (provide example Markdown if applicable):

[label][1]

[1]: #not-code "Text"

And I've set IncludeSourceSpans.BLOCKS_AND_INLINES when building the parser.

Expected behavior:

The LinkReferenceDefinition has a correct sourceSpans set.

Actual behavior:

The sourceSpans is null on the LinkReferenceDefinition instance.

Note that this alternative without a title does have valid sourceSpans on the LinkReferenceDefinition:

[label][1]

[1]: #not-code

Using "org.commonmark:commonmark:0.21.0".

tjpalmer avatar May 10 '23 01:05 tjpalmer