Wrong output while parsing markdown to html #243

Closed
opened 2026-01-29 14:31:26 +00:00 by claunia · 7 comments
Owner

Originally created by @ShadowmourneE on GitHub (Nov 22, 2018).

Hi all,
For example I would like to parse such markdown expression:
"**_boldItailcs_**clean_italics_" ( the first word is bold and italics).
Consequently, the output in HTML is following:
<p>**<em>boldItailcs</em>**clean_italics_</p>
but should be for example
<p><strong><em>BOLD</em></strong>clean<em>XUYUS</em></p>

Originally created by @ShadowmourneE on GitHub (Nov 22, 2018). Hi all, For example I would like to parse such markdown expression: ` "**_boldItailcs_**clean_italics_" ( the first word is bold and italics). ` Consequently, the output in HTML is following: `<p>**<em>boldItailcs</em>**clean_italics_</p>` but should be for example `<p><strong><em>BOLD</em></strong>clean<em>XUYUS</em></p>`
Author
Owner

@xoofx commented on GitHub (Nov 22, 2018):

Unfortunately what you are looking for is not a correct CommonMark markdown. You can see that all CommonMark implementations are rendering this in the same way

@xoofx commented on GitHub (Nov 22, 2018): Unfortunately what you are looking for is not a correct CommonMark markdown. You can see that all CommonMark implementations are [rendering this in the same way](https://babelmark.github.io/?text=**_boldItailcs_**clean_italics_)
Author
Owner

@Creta5164 commented on GitHub (Jan 26, 2020):

Uh, sorry for reopen this issue, I have found something weird behaviour.
In this case works well. (line 6)
It uses advenced extensions.

image
Test snippet(markdig(advenced))

Perhaps these parts may not be intuitive in parsing criteria, I think.

Version : 0.18.0

@Creta5164 commented on GitHub (Jan 26, 2020): Uh, sorry for reopen this issue, I have found something weird behaviour. In this case works well. (line 6) It uses advenced extensions. ![image](https://user-images.githubusercontent.com/13521406/73140196-71c3b480-40b9-11ea-90fe-3341647e8f69.png) [Test snippet(markdig(advenced))](https://babelmark.github.io/?text=%23+%EB%B2%A1%ED%84%B0%EB%8A%94+%EB%AC%B4%EC%97%87%EC%9D%B8%EA%B0%80%EC%9A%94%3F%0A%0A**%EB%B2%A1%ED%84%B0(Vector)**+%EB%8A%94%2C+%EB%8B%A8%EC%88%9C%ED%9E%88+%EB%A7%90%ED%95%B4%EC%84%9C++%0A%EC%97%AC%EB%9F%AC%EA%B0%9C%EC%9D%98+%EC%88%AB%EC%9E%90%EB%A5%BC+%ED%95%A8%EA%BB%98+%EB%AC%B6%EC%96%B4%EB%86%93%EC%9D%80+%EA%B2%83%EC%9D%84+%EB%A7%90%ED%95%A9%EB%8B%88%EB%8B%A4.++%0A%EC%88%AB%EC%9E%90%EB%93%A4%EC%9D%84+%EB%AC%B6%EC%96%B4%EB%86%93%EB%8A%94+%EC%9D%B4%EC%9C%A0%EB%8A%94++%0A%2B%2B**%EB%B0%A9%ED%96%A5**%EC%9D%B4%EB%82%98+**%ED%81%AC%EA%B8%B0**%EB%A5%BC+%ED%91%9C%ED%98%84%ED%95%98%EA%B8%B0+%EC%9C%84%ED%95%B4%EC%84%9C%2B%2B%EC%A3%A0.%0A%0A%3Cproblem-set+Path%3D%22Part+1%2FUnderstandingVector%22%3E%3C%2Fproblem-set%3E) Perhaps these parts may not be intuitive in parsing criteria, I think. Version : 0.18.0
Author
Owner

@MihaZupan commented on GitHub (Jan 26, 2020):

Can you point out which part seems incorrect and what the expected output would be?

@MihaZupan commented on GitHub (Jan 26, 2020): Can you point out which part seems incorrect and what the expected output would be?
Author
Owner

@Creta5164 commented on GitHub (Jan 26, 2020):

Originally, it's render like this.
image

But, when remove first space in line 3, it'll be render without strong.
But inside of em, that's rendered as expect well.
image

This is might be confusing about this behaviour.

@Creta5164 commented on GitHub (Jan 26, 2020): Originally, it's render like this. ![image](https://user-images.githubusercontent.com/13521406/73140668-d8979c80-40be-11ea-9ad9-ef53fa88d678.png) But, when remove first space in line 3, it'll be render without `strong`. But inside of `em`, that's rendered as expect well. ![image](https://user-images.githubusercontent.com/13521406/73140650-99694b80-40be-11ea-9497-87aae350fc0b.png) This is might be confusing about this behaviour.
Author
Owner

@Creta5164 commented on GitHub (Jan 26, 2020):

image

image

I have found when it ends with bracket then had problem, I think it's not like in this case.
Should I open new issue about this?

@Creta5164 commented on GitHub (Jan 26, 2020): ![image](https://user-images.githubusercontent.com/13521406/73140711-552a7b00-40bf-11ea-86ed-2d87489c9471.png) ![image](https://user-images.githubusercontent.com/13521406/73140715-59ef2f00-40bf-11ea-9c2a-f810ccdfb6c4.png) I have found when it ends with bracket then had problem, I think it's not like in this case. Should I open new issue about this?
Author
Owner

@Creta5164 commented on GitHub (Jan 26, 2020):

Uh, sorry for keep knocking this, common-mark have test case about this.
I'll finish this conversation, thank you for attention!
https://spec.commonmark.org/dingus/?text=*(*foo)%0A

@Creta5164 commented on GitHub (Jan 26, 2020): Uh, sorry for keep knocking this, common-mark have test case about this. I'll finish this conversation, thank you for attention! https://spec.commonmark.org/dingus/?text=*(*foo)%0A
Author
Owner

@Creta5164 commented on GitHub (Jan 26, 2020):

Okay, if someone have looking about like this problem, this is how to do it.
Use HTML tag, instead markdown note.

image

image

@Creta5164 commented on GitHub (Jan 26, 2020): Okay, if someone have looking about like this problem, this is how to do it. Use HTML tag, instead markdown note. ![image](https://user-images.githubusercontent.com/13521406/73140907-72604900-40c1-11ea-88d9-4c88b198733b.png) ![image](https://user-images.githubusercontent.com/13521406/73140912-8146fb80-40c1-11ea-96b6-42638f778ced.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#243