markdown-it / markdown-it/markdown-it
list sourceMap end row includes trailing blank lines
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 21.9k
- Forks
- 1.8k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 1
Description
When generating sourcemap for lists (both ul,li), the trailing blank lines (\s*) are included thus the end row of the following example isn't 1 as usual, but 3:
- aaa
bbb
see demo, where both bullet_list_open and list_item_open have [ 0, 9 ]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the supplied list example and inspect how source-map ranges are assigned to bullet_list_open and list_item_open. Confirm that trailing blank lines are excluded from the end row, matching the following line's behavior, then add or update coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100