# Punctuation marks causing Markdown bold display to fail

**URL:** https://meta.discourse.org/t/markdown/407071
**Category:** Bug
**Created:** [July 8, 2026, 12:58pm UTC](https://meta.discourse.org/t/markdown/407071 "2026-07-08T12:58:11Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![sniper756](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sniper756/32/545002_2.png) [@sniper756](https://meta.discourse.org/u/sniper756)
#### Post date: [July 8, 2026, 12:58pm UTC](https://meta.discourse.org/t/markdown/407071/1 "2026-07-08T12:58:11Z")

</div>

**Hello.** Okay  
**hello.** yes

As shown above, bold formatting is not working.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [July 8, 2026, 1:15pm UTC](https://meta.discourse.org/t/markdown/407071/2 "2026-07-08T13:15:32Z")

</div>

**Hello. Okay**

**Hello. Okay**

**hello. Okay**

Eh? No matter if I’m using `**` or B-button I get bolded text. Same with markdown editor and RTE.

---

<div class="post-metadata">

### Author: ![sniper756](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sniper756/32/545002_2.png) [@sniper756](https://meta.discourse.org/u/sniper756)
#### Post date: [July 8, 2026, 1:19pm UTC](https://meta.discourse.org/t/markdown/407071/3 "2026-07-08T13:19:45Z")

</div>

> [@Jagster](#):
>
> Hello. Okay

\*\*Hello. Okay.\*\*hello

There is punctuation before the final \*\*, followed immediately by text. Give it a try.

```plaintext
The following format will not work
**+text+punctuation+** +text

```

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [July 8, 2026, 1:40pm UTC](https://meta.discourse.org/t/markdown/407071/4 "2026-07-08T13:40:41Z")

</div>

**hello. Okey.** some text

And

**hello okey** without punctuation

But if we don’t use space after punctuation and ending `**` that happens:

` **hello okey.** text`  
\*\*hello okey.\*\*text

Versus

` **hello okey.** text`  
**hello okey.** text

I don’t know if this is a bug or a feature of markdown, or something.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [July 9, 2026, 10:58am UTC](https://meta.discourse.org/t/markdown/407071/5 "2026-07-09T10:58:23Z")

</div>

I believe the problem is not from punctuation before the asterisks, but rather text immediately _after_ the asterisks with no space.

**with punctuation.** space text  
\*\*with punctuation.\*\*no space text

```plaintext
**with punctuation.** space text
**with punctuation.** no space text

```

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [July 9, 2026, 11:05am UTC](https://meta.discourse.org/t/markdown/407071/6 "2026-07-09T11:05:04Z")

</div>

> [@Jagster](#):
>
> I don’t know if this is a bug or a feature of markdown

I do. It’s markdown’s default behavior. 🙂

---

<div class="post-metadata">

### Author: ![sk-or-v1-contents](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sk-or-v1-contents/32/547175_2.png) [@sk-or-v1-contents](https://meta.discourse.org/u/sk-or-v1-contents)
#### Post date: [July 11, 2026, 4:05pm UTC](https://meta.discourse.org/t/markdown/407071/7 "2026-07-11T16:05:09Z")

</div>

It’s a known problem in Markdown, and can’t be fixed unless you can change the Markdown parser

> **[CJK and bold tags \*\* possibly complex issue?](https://talk.commonmark.org/t/cjk-and-bold-tags-possibly-complex-issue/4034)**
>
> There is a previous thread from 2020: This highlights the case I run into in present. As background: I’m dealing primarily with Chinese, Japanese and Arabic but with people on the team from each respective area, and they are fortunately fluent...

And my workaround is to use `<span></span>`

` **是的。** <span></span>对的。` **是的。** 对的。

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [July 12, 2026, 10:02pm UTC](https://meta.discourse.org/t/markdown/407071/8 "2026-07-12T22:02:48Z")

</div>

Per CommonMark, a `**` can only _close_ strong emphasis if it’s part of a [right-flanking delimiter run](https://spec.commonmark.org/0.31.2/#right-flanking-delimiter-run). A delimiter preceded by punctuation (`.`) and followed by a word character (`t`) is _not_ right-flanking, so it can’t close. `markdown-it` parses it as literal text. Same rule applies to `*`, `_`, and `__`.

I think there’s not much we can do about this, we’re following the spec, but this showed me we had a bug with the rich editor markdown serializer: if you used the UI to build this situation (\*\*text.\*\*text), it displayed correctly on the rich editor, but cooked as plain-text. [This PR](https://github.com/discourse/discourse/pull/41597) addressed this scenario by expelling the punctuation from the marked area, so it becomes **text**.text (` **text**.text`).

---

<div class="post-metadata">

### Author: ![sk-or-v1-contents](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sk-or-v1-contents/32/547175_2.png) [@sk-or-v1-contents](https://meta.discourse.org/u/sk-or-v1-contents)
#### Post date: [July 13, 2026, 2:36am UTC](https://meta.discourse.org/t/markdown/407071/9 "2026-07-13T02:36:41Z")

</div>

> [@renato](#):
>
> if you used the UI to build this situation (\*\*text.\*\*text), it displayed correctly on the rich editor, but cooked as plain-text

Can still reproduce this bug, the punctuation is only moved out after I switch to Markdown editor or post.

Test with rich editor: **text**.text

the punctuation is still initially bolded

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [July 18, 2026, 2:01am UTC](https://meta.discourse.org/t/markdown/407071/10 "2026-07-18T02:01:51Z")

</div>

This is expected, it only avoids breaking the intentional emphasis from the text with the compromise of expelling the (almost unnoticeable) punctuation from the emphasis during Markdown serialization.
