Non breaking space after strong causing rending to fail #149

Closed
opened 2026-01-29 14:28:44 +00:00 by claunia · 9 comments
Owner

Originally created by @topherdavis on GitHub (Oct 31, 2017).

The string contains a non-breaking space (character code 160) immediately after **time:** and this results in time: not being rendered in a strong tag.

Input:

**Check** **in/Check** **out:**  
**Check** **in** **time:** 5PM  

Output:

<p><strong>Check</strong> <strong>in</strong> **time:** 5PM<br /><strong>Check</strong> <strong>out</strong> <strong>time:</strong> Flexible</p>

Expected output:

<p><strong>Check</strong> <strong>in</strong> <strong>time:</strong> 5PM<br /><strong>Check</strong> <strong>out</strong> <strong>time:</strong> Flexible</p>
Originally created by @topherdavis on GitHub (Oct 31, 2017). The string contains a non-breaking space (character code 160) immediately after `**time:**` and this results in `time:` not being rendered in a `strong` tag. Input: ``` **Check** **in/Check** **out:** **Check** **in** **time:** 5PM ``` Output: ``` <p><strong>Check</strong> <strong>in</strong> **time:** 5PM<br /><strong>Check</strong> <strong>out</strong> <strong>time:</strong> Flexible</p> ``` Expected output: ``` <p><strong>Check</strong> <strong>in</strong> <strong>time:</strong> 5PM<br /><strong>Check</strong> <strong>out</strong> <strong>time:</strong> Flexible</p> ```
claunia added the bug label 2026-01-29 14:28:44 +00:00
Author
Owner

@topherdavis commented on GitHub (Oct 31, 2017):

I was doing some more testing and this also causes a failure to render:

Input:

**Unlimited-Fun®**®

Output:

<p>**Unlimited-Fun®**®</p>

Expected:

<p><strong>Unlimited-Fun®</strong>®</p>

This also fails:

**Seats-**10B, 10A

So I'm not sure what type of characters make it fail.

Both of these also fail with em tags as well.

@topherdavis commented on GitHub (Oct 31, 2017): I was doing some more testing and this also causes a failure to render: Input: `**Unlimited-Fun®**®` Output: ``` <p>**Unlimited-Fun®**®</p> ``` Expected: ``` <p><strong>Unlimited-Fun®</strong>®</p> ``` This also fails: ``` **Seats-**10B, 10A ``` So I'm not sure what type of characters make it fail. Both of these also fail with `em` tags as well.
Author
Owner

@xoofx commented on GitHub (Oct 31, 2017):

Could you reproduce this on babelmark?

@xoofx commented on GitHub (Oct 31, 2017): Could you reproduce this on [babelmark](https://babelmark.github.io/)?
Author
Owner

@topherdavis commented on GitHub (Oct 31, 2017):

Yes I verified all of them against babelmark and locally, but having trouble reproducing now. I'm going investigate a little more. Thanks!

@topherdavis commented on GitHub (Oct 31, 2017): Yes I verified all of them against babelmark and locally, but having trouble reproducing now. I'm going investigate a little more. Thanks!
Author
Owner

@topherdavis commented on GitHub (Oct 31, 2017):

This isn't exactly the same as **Unlimited-Fun®**® but it is comparable.

https://babelmark.github.io/?text=Unlimited-Fun%26%23174%3B%26%23174%3B

@topherdavis commented on GitHub (Oct 31, 2017): This isn't exactly the same as `**Unlimited-Fun®**®` but it is comparable. https://babelmark.github.io/?text=*Unlimited-Fun%26%23174%3B*%26%23174%3B
Author
Owner

@topherdavis commented on GitHub (Oct 31, 2017):

I knew I wasn't crazy. I must have either missed I was pasting the html encoded version or chrome was doing something awesome for me.

Again not the same as **Check** **in** **time:** 5PM

https://babelmark.github.io/?text=Check+in+time%3A%26%23160%3B5PM++%0A

@topherdavis commented on GitHub (Oct 31, 2017): I knew I wasn't crazy. I must have either missed I was pasting the html encoded version or chrome was doing something awesome for me. Again not the same as `**Check** **in** **time:** 5PM ` https://babelmark.github.io/?text=**Check**+**in**+**time%3A**%26%23160%3B5PM++%0A
Author
Owner

@xoofx commented on GitHub (Nov 1, 2017):

Good, that's indeed a bug in Markdig.

@xoofx commented on GitHub (Nov 1, 2017): Good, that's indeed a bug in Markdig.
Author
Owner

@xoofx commented on GitHub (Nov 1, 2017):

This should be part of upcoming 0.14.2

@xoofx commented on GitHub (Nov 1, 2017): This should be part of upcoming 0.14.2
Author
Owner

@xoofx commented on GitHub (Nov 1, 2017):

Babelmark is updated

@xoofx commented on GitHub (Nov 1, 2017): Babelmark is updated
Author
Owner

@topherdavis commented on GitHub (Nov 1, 2017):

👍

@topherdavis commented on GitHub (Nov 1, 2017): 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#149