[bug][editor] Slash command whose name contains a space (e.g. "/Heading 1") inserts literal text instead of the block #124
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: medium
The slash menu lists items with spaces in their labels ("Heading 1", "Math block", "2 Columns"), but typing the label as shown breaks the command.
Where:
apps/client/src/features/editor/extensions/slash-command.ts:16— the tiptapSuggestionuseschar: '/'with noallowSpaces, so a space terminates the query and closes the menu.Repro (live):
/Heading 1and press Enter → the menu closed on the space; the literal text/Heading 1stays in the document as a plain paragraph and no heading is created — zero feedback./h1+ Enter → correctly creates an<h1>and leaves no literal text.Impact: a user who types what the menu shows gets dead literal text and a silently non-functional command.
Suggested fix: set
allowSpaces: trueon the slash suggestion (and keep the existing fuzzy match), or insert the top match on Enter even when the query contains a space.Filed from an automated full-product QA pass on
develop@v0.93.0-64-gb60190ff, fresh DB. Each item below was reproduced live in a clean browser session unless noted.Screenshot