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

Bold not compatible mid sentence #95

Open
stenspect opened this issue Aug 5, 2021 · 2 comments
Open

Bold not compatible mid sentence #95

stenspect opened this issue Aug 5, 2021 · 2 comments

Comments

@stenspect
Copy link

stenspect commented Aug 5, 2021

Hi there, the bold (**) indicators don't seem to work mid sentence or on a line break. It leaves an additional space which renders them as just stars. This is in Gutenberg.

Example:
With that said,** it is essential to seek out a gaming monitor with a high refresh rate and a low response time**.

@evbacher
Copy link
Owner

evbacher commented Aug 5, 2021

Thanks for point this out:

Docs to Markdown is pretty literal in converting. If there's a space that's marked bold at the beginning (or end) of a string, it will include that space within the ** markers. Markdown (at least this flavor and apparently Gutenberg too) is not very forgiving:

** with leading space.**

without leading space.

However, I'll take a look at swapping out leading and trailing spaces for font-formatting runs. (I think there's already another similar issue to this one.) If it's doable and doesn't affect performance too much, I'll try to get it in.

@mchugh19
Copy link

I just ran into something similar with the spacing around bold items.

**key: **value Is much better rendered as **key:** value
It might be worth special casing the **[a-zA-Z] handling to move the space to the other side of the asterisks

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

No branches or pull requests

3 participants