MichaelCurrin/docsify-js-tutorial

underline and bold

Erimus-Koo opened this issue · 7 comments

In some special cases, like below, it's broken.

「<u>**中文内容**</u>」
「<u>**中文**内容</u>」
「<u>中**文内**容</u>」
「<u>中文**内容**</u>」
「**<u>中文内容</u>**」
「**<u>中文</u>内容**」
「**中<u>文内</u>容**」
「**中文<u>内容</u>**」

image

It looks docsify force need a space before/after the ** mark.
But in Asian language, there's usually no space between words.

And in line 5 of code block, the first ** is ignored, but the second works.

Have you tried using underscore for underlining?

**中文_内容_**

Otherwise, you can submit this as fix on the repo for Docsify itself, rather than this independent tutorial

https://github.com/docsifyjs/docsify

It looks like the GitHub Markdown handles your usecases fine.

「<u>**中文内容**</u>」
「<u>**中文**内容</u>」
「<u>中**文内**容</u>」
「<u>中文**内容**</u>」
「**<u>中文内容</u>**」
「**<u>中文</u>内容**」
「**中<u>文内</u>容**」
「**中文<u>内容</u>**

中文内容
中文内容」
「中文内容」
「中文内容
中文内容
中文内容
中文内容
中文内容

Yes, it looks fine in GitHub.

And I use Typora write markdown, single underscores is em. I'm not sure is that standard markdown syntax?

Markdown Reference - Typora Support
https://support.typora.io/Markdown-Reference/#emphasis

I've wrote a theme present same style in Typora and Docsify, then meet this problem. I'm not good at js.

I think <u> and <em> are close enough in HTML, I've never bothered to check how different they are. Using underscore in Markdown for years has been fine for me to get it rendered as em.

I haven't used Typora - I stick to GFM which I see is linked at the top of the docs and close to Typora.

Again, I'm just a user of Docsify, so if you found a bug in how it renders then you can report that to Docsify but it might involve a major change (like swapping out one Markdown system for another) at a low-level so you might not get help.

I'm idiot! Finally I found I submit issue in wrong repository!
I even not know how it happen, lol.
Sorry for disturbing and thanks for your time.

You're welcome. Good luck.