StackExchange / StackExchange/Stacks-Editor
GH editor-like (un)ordered list bullet auto insertion
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 437
- Forks
- 61
- Avg merge
- 16h 2m
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
On the Markdown mode, I expect:
- Hitting enter seems like it would give me another number when I already am on a numbered line.
- Hitting enter again I'd assume it would delete the number if no other text was present.
- Hitting again (without the number on a line) I'd assume it would create a new line, as expected, normal enter behavior.
THIS Github EDITOR I'M IN RIGHT NOW DOES EXACTLY WHAT I'M ASKING FOR :)
We can do one better though, if we're on a line below a numbered line, say we're editing an existing list:
I expect that we would interpret the previous line and make the next number if there are no newlines or lines of text in between.
I don't think that would delay things too much since you only have to look at the beginning of the line and the next couple of characters with a compiled regex or w/e.
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
No file or test is named. Start by locating the Markdown mode input and list-handling logic, then trace how Enter currently processes numbered and unordered list lines. Done means matching the described continuation, list-exit, and normal-newline behavior, with coverage for each case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100