Is there a way to disable trailing whitespace character ( )? #122
Answered
by
ChristianMurphy
dannyadkins
asked this question in
Q&A
-
When you type and leave a space at the end of e.g. a paragraph block, it is replaced with " " placeholder. I can't find exactly where in the code this is getting injected. Is there a way to disable this? We would like to get visually "clean" text outputted from our editor without this special character. Thanks for any help! |
Beta Was this translation helpful? Give feedback.
Answered by
ChristianMurphy
Jan 10, 2024
Replies: 1 comment 4 replies
-
Welcome @dannyadkins! 👋 Could you frame your question in a but more detail? See https://github.com/syntax-tree/.github/blob/main/support.md#support for recommendations. It's unclear:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Milkdown adds its own transforms.
If you use
mdast-util-to-markdown
directly throughremark
no character is added.https://codesandbox.io/p/devbox/crazy-fermi-lzjy7p?file=%2Fsrc%2Fmain.ts%3A24%2C1&workspaceId=d845f959-45b3-427c-9d19-50c1c90a9035
This behavior is being set by Milkdown through a custom plugin https://github.com/Milkdown/milkdown/blob/063238906971aceed1bdafd6b5a634433dd4da3b/packages/preset-commonmark/src/plugin/remark-line-break.ts#L7C1-L9