markdown-it-py icon indicating copy to clipboard operation
markdown-it-py copied to clipboard

Record line numbers on tokens

Open djmattyg007 opened this issue 3 years ago • 1 comments

Context

I'm writing a tool to parse markdown files and verify that links are valid. To be able to provide the most valuable, accurate feedback, I need to be able to display line numbers to the user, so that they know exactly where in a file the broken link is.

Right now this isn't possible, because line numbers aren't recorded on token objects.

Proposal

Store line numbers on tokens, and provide a convenient wrapper for accessing the line number of a node when using SyntaxTreeNode.

Tasks and updates

No response

djmattyg007 avatar May 23 '22 12:05 djmattyg007

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar May 23 '22 12:05 welcome[bot]