mdx-editor / mdx-editor/editor

The linebreak (shift+enter) is removed before <u> (underline formatting) during conversion.

Open
#200 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3.7k
Forks
307
Avg merge
14h 22m
Merged PRs (30d)
5

Description

Hello! Cool library, but... The new line is removed before (underline formatting). Example. In the textbox I type:
"123
underlinedString"

In the output (ref.current.getMarkdown()) I get "123 underlinedString". Yes, with space between strings. This problem I see only with the new line before . I am using basic settings, just toolbarPlugin.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the two-line input and the basic toolbarPlugin configuration, then inspect the conversion path used by ref.current.getMarkdown(). Compare handling of a line break before underline formatting with other inline formatting cases. Done means getMarkdown() preserves the intended line break before the underlined text.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.