StackExchange / StackExchange/Stacks-Editor
Applying a [numbered / bulleted] list to multiple lines works differently in each mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 437
- Forks
- 61
- Avg merge
- 16h 2m
- Merged PRs (30d)
- 8
Description
Describe the bug
Markdown mode:
- After selecting and applying a numbered list, the numbers assigned to each line are the same. Switching to rich text [and back to Markdown] fixes the numbering. This is not a bug, as Marijn notes in a comment on MSE, but it would be nice to have it apply the proper numbering in the first go itself (like in the Github editor).
- Compared to rich text mode (and the old editor), the numbering is applied to all the lines. In the case of bulleted lists, the bullet points are also applied to all the lines in Markdown mode.
- In the case of double line breaks, the [numbers / bullet points] are applied to blank spaces as well (as shown in the GIF below).
Rich text mode:
- After selecting all the lines, with either single or double line breaks, and applying a numbered list in rich text mode, the numbering is only applied to the first item in the list, as is the case in the old editor. This is also the case with bulleted lists.
To Reproduce
Steps to reproduce the behavior:
- Type text on multiple lines with single line breaks.
- Select all lines.
- Apply [Numbered / Bulleted] list to the selected text in Markdown mode.
- Repeat using double line breaks.
- Repeat the above in rich text mode.
- Observe the difference.
Expected behavior
Make the way numbering is applied consistent in both modes.
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
- Version: 104.0.5112.101
Additional context
Also on MSE: https://meta.stackexchange.com/a/380604/513150
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 numbered and bulleted list steps in Markdown mode and rich text mode, including single and double line breaks, then compare the results with the expected consistent behavior. No source file or test is named; done means both modes apply list markers consistently without numbering blank lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100


