You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on anoth
8000
er tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typing "1984. " at the start of a Paragraph turns it into a numbered list #93
A Writer who starts a Paragraph with a year and a period, such as 1984. The year Orwell chose., gets an ordered list numbered from 1984 as soon as they type the space.
Why
src/editor/DocumentEditor.tsx:211 uses TipTap's StarterKit unmodified. Its ordered-list input rule is /^(\d+)\.\s$/ (@tiptap/extension-list 3.31.3), so any digits, a period and a space at the start of a textblock start a list.
Is it a bug?
That is for triage. Story 199 asks that Markdown shortcuts keep working, and 1. becoming a list is exactly that shortcut. But the rule can't tell 1. from 1984. . #51 met the same ambiguity from the other side: the Writer accepted that such a Paragraph counts as one sentence, and documented it in the metrics panel. That decision assumed the Paragraph exists, and in the live Editor it usually doesn't, because this input rule runs first.
Options
Accept it. The Writer can undo the conversion. Untested: TipTap's undoInputRule usually reverts it on Backspace right after it fires. If this holds, say so in How this works.
Narrow the rule. For example, only a number below some limit, or only 1. to start a list. This changes a Markdown shortcut, so story 199 needs a look.
Leave the shortcut and change nothing else. Close as wontfix.
How it was found
Noticed while implementing #51 (PR #72). The rule is confirmed from the extension's source; the Backspace undo in option 1 is not verified.
Activity