Skip to content

Add data-lineNumbers attribute to <p> element#2

Open
dbolack-ab wants to merge 3 commits intonaturalcrit:mainfrom
dbolack-ab:line_numbers
Open

Add data-lineNumbers attribute to <p> element#2
dbolack-ab wants to merge 3 commits intonaturalcrit:mainfrom
dbolack-ab:line_numbers

Conversation

@dbolack-ab
Copy link
Copy Markdown
Collaborator

Add testing for position on token to set data-lineNumber Update marked version range to minimum to support marked-token-position

Add testing for position on token to set data-lineNumber
Update marked version range to minimum to support marked-token-position
@calculuschild
Copy link
Copy Markdown
Member

calculuschild commented Jan 27, 2026

I can see the intent here, though I can't help but think there must be a way to do it without requiring a change to every extension and every renderer.

Can we pause this PR and try to find a more general solution we could just load alongside all the other extensions? I don't have a perfect solution in mind, but it feels like we should be able to use the postprocess() hook and inject any custom attributes at that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants