Skip to content

Commit e5af668

Browse files
committed
docs: trailing spaces in shortcuts
1 parent 4f2082f commit e5af668

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/docs/rich-text-formatting/lists.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ checkbox - you don't need to wire anything up for that.
5252

5353
:::note
5454

55-
You can also create ordered and unordered lists by typing respectively `1.`
56-
and `-`. That behavior is present by default and can be customized with
55+
You can also create ordered and unordered lists by typing respectively `'1. '`
56+
and `'- '`. That behavior is present by default and can be customized with
5757
[`Text shortcuts`](/rich-text-formatting/text-shortcuts).
5858

5959
:::

docs/docs/rich-text-formatting/text-shortcuts.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import TextShortcutsEditorSrc from '!!raw-loader!@site/src/examples/TextShortcut
99
# Text shortcuts
1010

1111
Text shortcuts let users format as they type, the way Markdown editors do -
12-
typing `#` turns a line into a heading, wrapping a word in `**` makes it bold.
12+
typing `'# '` turns a line into a heading, wrapping a word in `**` makes it bold.
1313
You configure them with the `textShortcuts` prop, an array that maps a `trigger`
1414
string to a `style`:
1515

@@ -35,7 +35,7 @@ things:
3535
- **Paragraph shortcuts** (`h1``h6`, `blockquote`, `codeblock`,
3636
`unordered_list`, `ordered_list`, `checkbox_list`) fire at the **start of a
3737
paragraph**. The trigger is the prefix you type before the line's content -
38-
e.g. `#` for a heading, `-` for a bulleted list. Since a paragraph can only hold
38+
e.g. `'# '` for a heading, `'- '` for a bulleted list. Since a paragraph can only hold
3939
one paragraph style, these only fire on a **plain** paragraph: if the line is
4040
already a heading or a list item, typing the prefix does nothing.
4141

@@ -68,8 +68,8 @@ array (`textShortcuts={[]}`) disables shortcuts altogether.
6868

6969
## Try it out
7070

71-
The editor below wires up one shortcut of each kind - a paragraph one (`#` → H1)
72-
and an inline one (`**` → bold). Start a line with `#` and watch it become a
71+
The editor below wires up one shortcut of each kind - a paragraph one (`'# '` → H1)
72+
and an inline one (`**` → bold). Start a line with `'# '` and watch it become a
7373
heading, then wrap a word in `**stars**` to bold it.
7474

7575
<InteractiveExample src={TextShortcutsEditorSrc} component={TextShortcutsEditor} />

0 commit comments

Comments
 (0)