mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
LinkReferenceDefinition.Line never assigned #144
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @labreuer on GitHub (Oct 17, 2017).
I am very interested in markdig tracking the precise source code location for the syntax tree; unfortunately
LinkReferenceDefinition.Linenever seems set, perhaps becauseLinkReferenceDefinitionis generated from anICharIterator, which could be aStringSlice, which has no line # information. Was this by design?If you're ok with
LinkReferenceDefinition.TryParseaccepting aStringLineGroup.Iterator, that would seem to suffice; it is not currently called with aStringSlice. I'm happy to put together a pull request.@xoofx commented on GitHub (Oct 17, 2017):
afair no. It's just that line information was added after and a few places could have been missed during the process of adding the spans (I know for example that many extensions are not updated correctly...)
I don't remember the details, but in
LinkReferenceDefinition.TryParsewe are already able to output spans for label..etc (viaLinkHelper.TryParseLinkReferenceDefinition) so it should be possible to work with this already (as it is only using global Start position from beginning of file so it should be fine...). PR much welcome of course.@MihaZupan commented on GitHub (Jan 18, 2019):
This was fixed by #243
@MihaZupan commented on GitHub (Apr 5, 2019):
Closing as resolved