Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multi-line emphasis #550

Merged
merged 5 commits into from
Mar 21, 2024
Merged

Conversation

austingreco
Copy link
Contributor

Multi-line bolded/italic wasn't rendering properly -- the regex didn't allow a newline. Added an option for a newline character in the bold/italic regexes.

Input

**multi line
bold text**

Output before fix (nothing is bolded, asterisks remain on second line)

multi line
bold text**

Output after fix (both lines bold)

multi line
bold text

Fixes #449

index.tsx Fixed Show resolved Hide resolved
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
index.tsx Fixed Show fixed Hide fixed
Copy link
Owner

@quantizor quantizor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@quantizor quantizor merged commit c0a0ac1 into quantizor:main Mar 21, 2024
3 checks passed
Innei pushed a commit to Innei/markdown-to-jsx that referenced this pull request Mar 28, 2024
* fix: multi-line emphasis

* feat: handle newlines in mark and strikethrough formatting as well

* refactor: ensure the same skip regex is used for inlines

* chore: add some comments

---------

Co-authored-by: Evan Jacobs <probablyup@gmail.com>
Signed-off-by: Innei <i@innei.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/n inside bold breaks the bold
2 participants