Why is a space required at the end of a Markdown shortcut? #4515
Unanswered
ryo-imai-och
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Have you been able to solve this? From my perspective, the space is required as a trigger to prevent unwanted transformations from happening when the user is just typing stuff. Imagine that for some reason a user just wants to put the If you automatically trigger the transformation the user won't be able to do that because the content will be transformed every time as it is being typed out. That's what I believe, it makes sense for most cases. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed when customizing the Markdown shortcuts that the last space is mandatory due to the following code included in MarkdownShortcuts.ts:
For example, I want to modify it so that it's applied just by inputting
---, like HorizontalRules, but it doesn't work unless I include a trailing space in the regular expression.Of course, if I customize MarkdownShortcuts.ts, it works even without a space. Is there any significant reason for this behavior?
Beta Was this translation helpful? Give feedback.
All reactions