Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuemark2.0 issues #379

Open
tomByrer opened this issue Oct 3, 2024 · 13 comments
Open

Nuemark2.0 issues #379

tomByrer opened this issue Oct 3, 2024 · 13 comments
Assignees
Labels
bug nuemark Related to nuemark package

Comments

@tomByrer
Copy link

tomByrer commented Oct 3, 2024

Doing a quick code review of your dev branch, I am confused if the Blocks or Inline is scanned first? If Blocks, then it seems this code:

 *** Bold Italic ***

Would render as an <hr> since you are just scanning first few characters.?

Also be aware that CommonMark is VERY flexible for <hr>. I personally don't think you need to cover every edge case, but it could help to document "Only the common Markdown/CommonMark rules are covered."

@tomByrer tomByrer added improvement new feature New feature or request labels Oct 3, 2024
@nobkd nobkd added nuemark Related to nuemark package needs investigation and removed new feature New feature or request labels Oct 3, 2024
@nobkd

This comment was marked as resolved.

@nobkd nobkd added bug and removed improvement labels Oct 12, 2024
@nobkd

This comment was marked as resolved.

@nobkd nobkd changed the title Newmark2.0 *** Bold Italic *** & HR Nuemark2.0 *** Bold Italic *** & HR Oct 12, 2024
@nobkd

This comment was marked as resolved.

@tipiirai
Copy link
Contributor

@tomByrer @nobkd fixed all issues mentioned on this article

@nobkd
Copy link
Collaborator

nobkd commented Oct 21, 2024

Thank youu!
I'll check later today, if I find more unexpected results :)

@nobkd
Copy link
Collaborator

nobkd commented Oct 21, 2024

InputExpected (Commonmark Spec Implementation)Nuemark 2
*test**

**test***

***test****

- - -

****test***

***test**

**test*
<p><em>test</em>*</p>
<p><strong>test</strong>*</p>
<p><em><strong>test</strong></em>*</p>
<hr>
<p>*<em><strong>test</strong></em></p>
<p>*<strong>test</strong></p>
<p>*<em>test</em></p>
<p><em>test</em>*</p>
<p><strong>test</strong>*</p>
<p><em><strong>test</strong></em>*</p>
<hr>
<p><em><strong>*test</strong></em></p>
<p>***test**</p>
<p>**test*</p>

The first half (before hr) is correct, the second half is wrong (e.g. position of * in first after hr).

PS: I started building a test using the commonmark-spec test suite. See dev...nobkd:nue:test/cmark-spec. Maybe you want to try using it.

@nobkd

This comment was marked as resolved.

@nobkd nobkd changed the title Nuemark2.0 *** Bold Italic *** & HR Nuemark2.0 issues Oct 22, 2024
@tipiirai
Copy link
Contributor

No more loops with unclosed image tags such as ![foo *bar*]

@tipiirai
Copy link
Contributor

tipiirai commented Oct 23, 2024

Are image reflinks like ![foo][bar] supported in Markdown?

@tipiirai
Copy link
Contributor

btw: Nuemark will not support raw HTML, because that violates the separation of concerns principle

@nobkd
Copy link
Collaborator

nobkd commented Oct 23, 2024

Are image reflinks like ![foo][bar] supported in Markdown?

The commonmark reference implementation does support it: https://spec.commonmark.org/dingus/?text=!%5Bimg%5D%5Btag%5D%0A%0A%5Btag%5D%3A%20%2Fimg.png%0A#result

(PS: did you do the strike through implementation with one tilde (~) or with two (~~)? ~strike~ oder ~~strike~~?
Also, may I know why you used the pipe symbol |marked text| for <mark> and not the (in my opinion) more commonly used ==marked text==? To be more similar to glow?)
(PPS: do we have a simple way to write <details> with <summary>?)

Edit : you can btw remove marked from this tourimage: https://github.com/nuejs/nue/blob/dev/packages%2Fnuejs.org%2Ftour%2Fimg%2Fnpm-nue.png (maybe remove node modules and do a clean install on dev, to get all the dependency changes)

@nobkd
Copy link
Collaborator

nobkd commented Oct 28, 2024

Found more problems:

1. **bold** not bold **bold**
2. **test**:

expected:

<ol>
  <li><p><strong>bold</strong> not bold <strong>bold</strong></p></li>
  <li><p><strong>test</strong>:</p></li>
</ol>

reality:

<ol>
  <li><p><strong>bold** not bold **bold</strong></p></li>
  <li><p>**test**:</p></li>
</ol>

You can see this issue e.g. on the docs index page in on dev branch: http://localhost:8080/docs/

Edit: maybe the ps should not belong to the list items?

@nobkd
Copy link
Collaborator

nobkd commented Nov 2, 2024

Nuemark also doesn't support <br> line breaks using two or more spaces at the end of a line or a backslash at the end of a line:

foo  
bar

foo\
bar

expected:

<p>foo<br />
bar</p>
<p>foo<br />
bar</p>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug nuemark Related to nuemark package
Projects
None yet
Development

No branches or pull requests

3 participants