observablehq / observablehq/notebook-kit
Simplify the Enter behavior in Markdown lists to only support “tight” lists
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 371
- Forks
- 27
- Avg merge
- 3h 52m
- Merged PRs (30d)
- 1
Description
(Not sure if this is the right place to report this issue since it's about the Desktop code editor, lmk if there's a better place and I'll move it!)
When it comes to lists, Observable's Markdown code editor has a few behaviors that I found surprising:
- Pressing enter twice past the end of a list results in an (imo) incorrect state with a newline after the list followed by an extra
-:
- It will delete a list item if you press enter in a line containing
-:
There's a wide range of preferences when it comes to editing so I'm not sure if these are bugs.
I sometimes use a markdown cell as a scratch space to maintain ideas and to-do items inside a notebook and would appreciate it if there was a way to tweak this behavior slightly. For 1., I would like pressing Enter twice to not insert any additional content beyond the newlines, and for 2., it would be nice if it did not delete the empty list item.
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
Start by locating the Desktop code editor's Markdown list Enter handling. Reproduce both behaviors described in the issue, then make the tight-list behavior match the requested outcomes: pressing Enter twice adds only newlines, and pressing Enter on an empty list item does not delete it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100