# Commonmark-compliance: Reader should NOT parse intra word underscore (CJK and Cyrillic)

**URL:** <https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174>\
**Category:** Bug reports\
**Tags:** reading, repro, upstream-bug\
**Created:** [August 22, 2022, 2:35pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174 "2022-08-22T14:35:07Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ob-user](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/6a8cbe/32.png) [@ob-user](https://forum.obsidian.md/u/ob-user)\
**Post date:** [August 22, 2022, 2:35pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/1 "2022-08-22T14:35:07Z")

</div>

Steps to reproduce:

Copy and paste `字体_斜体_字体*斜体*字体`

Actual result:

![image](https://forum.obsidian.md/uploads/default/original/3X/0/2/02e029bfff0b5a72ca4fdafb69150aeaeaba6ef3.png)

Expected:

![image](https://forum.obsidian.md/uploads/default/original/3X/0/b/0ba227eb2006424fabe0fe140394332f7e877f08.png)

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [August 22, 2022, 2:49pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/2 "2022-08-22T14:49:06Z")

</div>

The problem is with the Reader, your actual result is correct. I edited the title to reflect where the problem is.

[https://spec.commonmark.org/0.30/#emphasis-and-strong-emphasis](https://spec.commonmark.org/0.30/#emphasis-and-strong-emphasis)

---

<div class="post-metadata">

**Author:** ![ob-user](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/6a8cbe/32.png) [@ob-user](https://forum.obsidian.md/u/ob-user)\
**Post date:** [August 22, 2022, 3:21pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/3 "2022-08-22T15:21:13Z")

</div>

Hi,

The “actual result” was the result from live preview, and the “expected” was the result from reading mode and the output file. The two results are inconsistent.

The two results are inconsistent. I guess the two modes use different parsers. You can say this is not a bug for its specific implementation, but I consider the inconsistency a bug.

---

<div class="post-metadata">

**Author:** ![ob-user](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/6a8cbe/32.png) [@ob-user](https://forum.obsidian.md/u/ob-user)\
**Post date:** [August 22, 2022, 3:26pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/4 "2022-08-22T15:26:32Z")

</div>

And btw do you consider this a bug?

Copy and paste `啦。 **啦。** 啦。`

The result in live preview:

![image](https://forum.obsidian.md/uploads/default/original/3X/8/7/87f968c79c725f9aee5a39b69fe983149f87d6f4.png)

From the website you cited, “Many implementations have also restricted intraword emphasis to the `*` forms”, so the asterisks here should work, right?

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [August 22, 2022, 3:56pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/5 "2022-08-22T15:56:52Z")

</div>

> [@ob-user](#):
>
> The “actual result” was the result from live preview, and the “expected” was the result from reading mode and the output file. The two results are inconsistent.

According to commonmark spec, The bug is in the reader, non LP.

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [August 22, 2022, 4:02pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/6 "2022-08-22T16:02:06Z")

</div>

> [@ob-user](#):
>
> Copy and paste `啦。 **啦。** 啦。`
> 
> The result in live preview:
> 
> ![image](https://forum.obsidian.md/uploads/default/original/3X/8/7/87f968c79c725f9aee5a39b69fe983149f87d6f4.png)
> 
> From the website you cited, “Many implementations have also restricted intra-word emphasis to the `*` forms”, so the asterisks here should work, right?

This is a whole other can of worms related to how markdown should handle Chinese special punctuation characters.

> [@Markdown: Treat CJK punctuation symbols as letters](https://forum.obsidian.md/t/markdown-treat-cjk-punctuation-symbols-as-letters/34354):
>
> Some aspects of the commonmark spec do not play well with CJK languages. For example, according to the spec punctuation should be handled as whitespaces hence a\*\*.test.\*\*b should NOT be bold, whereas a\*\*test\*\*b has test in bold. This is problematic for Chinese users. This FR is used to track a proposed deviation from the commonmark spec: handle Chinese punctuation symbols (that are different from regular punctuation symbols) as regular letters.

---

<div class="post-metadata">

**Author:** ![anon63144152](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@anon63144152](https://forum.obsidian.md/u/anon63144152)\
**Post date:** [August 22, 2022, 7:23pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/7 "2022-08-22T19:23:32Z")

</div>

How about not making the full stop bold?  
啦。 **啦** 。啦。  
`啦。 **啦** 。啦。`

Or using a zero-width space after the full stop (not sure if that will copy and paste here correctly)? Both parse.  
啦。 **啦。​** 啦。  
`啦。 **啦。​** 啦。`

---

<div class="post-metadata">

**Author:** ![ob-user](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/6a8cbe/32.png) [@ob-user](https://forum.obsidian.md/u/ob-user)\
**Post date:** [August 23, 2022, 6:28am UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/8 "2022-08-23T06:28:19Z")

</div>

Hi,

Thank you. These are good workarounds!

---

<div class="post-metadata">

**Author:** ![ob-user](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/6a8cbe/32.png) [@ob-user](https://forum.obsidian.md/u/ob-user)\
**Post date:** [August 23, 2022, 6:29am UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/9 "2022-08-23T06:29:57Z")

</div>

btw, how did you type that zero-width space?

---

<div class="post-metadata">

**Author:** ![anon63144152](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@anon63144152](https://forum.obsidian.md/u/anon63144152)\
**Post date:** [August 23, 2022, 8:29pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/10 "2022-08-23T20:29:06Z")

</div>

On macOS: Edit → Emoji & Symbols → insert the zero-width space.

---

<div class="post-metadata">

**Author:** ![Arachnid\_O](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@Arachnid\_O](https://forum.obsidian.md/u/Arachnid_O)\
**Post date:** [February 15, 2023, 2:45pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/11 "2023-02-15T14:45:42Z")

</div>

underscore do not work correctly with cyrilic symbols and broke links in preview mode.  
in line-preview it works correctly

### Steps to reproduce

enter text and link with underscore  
for example:

```auto
текст_подчёркивание [[текст_ссылка]]

```

see what happens in preview mode

### Expected result

working link to note `текст_ссылка` in preview

### Actual result

preview do not work correctly

### Environment

- Debug info:

```auto
SYSTEM INFO:
	Obsidian version: v1.1.9
	Installer version: v1.1.9
	Operating system: #1 SMP PREEMPT_DYNAMIC Mon Feb 6 11:26:13 UTC 2023 6.0.19-4-MANJARO
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

```

* * *

### Additional information

example on sandbox vault

 ![image](https://forum.obsidian.md/uploads/default/original/3X/5/a/5adf14fd6d6f2ed72e99d3d7b0d7dfd0244eae53.png)

this problem works on desktop client  
on mobile this not happens.

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [February 15, 2023, 2:54pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/12 "2023-02-15T14:54:34Z")

</div>

> [@Arachnid\_O](#):
>
> on mobile this not happens.

I am sure it happens too.

---

<div class="post-metadata">

**Author:** ![Arachnid\_O](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@Arachnid\_O](https://forum.obsidian.md/u/Arachnid_O)\
**Post date:** [February 15, 2023, 2:59pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/13 "2023-02-15T14:59:38Z")

</div>

i was test that  
links are not broken on android client. they only formatting to be italic  
live-preview

 ![Screenshot_20230215_175953_Obsidian](https://forum.obsidian.md/uploads/default/original/3X/8/c/8c877bb6dd5f28e9a1c549ff482751d39f82f436.jpeg)

preview:

 ![Screenshot_20230215_180026_Obsidian](https://forum.obsidian.md/uploads/default/original/3X/3/5/35e079256f293b162fee822af87d3a7a1404ac60.jpeg)

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [February 15, 2023, 3:23pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/14 "2023-02-15T15:23:48Z")

</div>

You are not separating with a blank line on mobile.

---

<div class="post-metadata">

**Author:** ![Guts](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@Guts](https://forum.obsidian.md/u/Guts)\
**Post date:** [May 20, 2023, 3:37am UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/15 "2023-05-20T03:37:13Z")

</div>

This is source mode

```auto
[[A_20230515132631_B]]
[A_20230515132631_B](A_20230515132631_B.md)
[[文字_20230515132631_文字]]
[文字_20230515132631_文字](文字_20230515132631_文字.md)

```

This is reading mode,it’s wrong.  
 ![image](https://forum.obsidian.md/uploads/default/original/3X/c/2/c294ea3a74db19e53f72988f37d8479aabd55c82.png)

This is reading mode,it’s right.  
 ![image](https://forum.obsidian.md/uploads/default/original/3X/9/e/9ee7b3c5194d1f7cb20e70bdbadf53e0b9289cfa.png)

Using [] () this form of a link, if the file name is like the fourth line-----the Chinese characters are next to `_`, then in the Reading mode, it will be rendered as an oblique body, which is incorrect. but in live preview mode, it’s normal.

The `_` is the delimiter of the file name. Normally, it should be like the first, second and third lines, and should not be rendered as italics.

Hope to repair this problem，or let the user choose to disable the unnecessary MD syntax. For example, I don’t usually use `_`, I usually use `*`  
`_` is useless and produces the above errors

---

<div class="post-metadata">

**Author:** ![charleslu](https://forum.obsidian.md/user_avatar/forum.obsidian.md/charleslu/32/52115_2.png) [@charleslu](https://forum.obsidian.md/u/charleslu)\
**Post date:** [April 2, 2025, 11:13pm UTC](https://forum.obsidian.md/t/commonmark-compliance-reader-should-not-parse-intra-word-underscore-cjk-and-cyrillic/42174/16 "2025-04-02T23:13:07Z")

</div>

When will this BUG be fixed? It has been taking too long.
