mdx-editor / mdx-editor/editor
[BUG] Bold format did not get serialized with any punctuation character
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
Describe the bug
Bold format serialized with any punctuation character cannot be rendered back.
Reproduction
quotes:
https://codesandbox.io/p/sandbox/mdx-editor-base-forked-yzft7z?file=%2Fsrc%2FApp.tsx
Exclamation mark:
https://codesandbox.io/p/sandbox/mdx-editor-base-forked-69dgt8?file=%2Fsrc%2FApp.tsx
(Originally I though it was quotes only, but after posting this bug report I reproduced it with exclamation mark)
To Reproduce
Steps to reproduce the behavior:
- Go to the codesandbox
https://codesandbox.io/p/sandbox/mdx-editor-base-forked-yzft7z?file=%2Fsrc%2FApp.tsx - In the first editor with markdown
md1, select"b"and hitctrl+b, it makes the "b" 3 chars bold. - In the console it should shows
content is now equal to md2 a**"b"**c. - But in second editor with
md2as initial markdown, it renders nothing bold.
Expected behavior
Ctrl+b should make the text bold even after serialized and deserialized back.
Screenshots
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the two linked CodeSandbox reproductions and trace the markdown serialization and deserialization of bold text containing a quote or exclamation mark. Verify the reported round trip from the first editor to the second, and consider the issue done when both punctuation cases render bold after serialization and deserialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, react, typescript
- Domain
- content, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100