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

Markdown sub bullet points syntax is changed (⇒ breaking old content layout) #14

Open
oliviergenest opened this issue Mar 30, 2023 · 6 comments

Comments

@oliviergenest
Copy link

Please see: kanboard/kanboard#5168
I am facing this issue and it has been reported that removing MarkdownPlus fixes the issue.
So probably this plugin is involved in the issue. What do you think?

Summary of the issue (more detailed here): sub-bullet were created with only one whitespace before *. Now, two whitespaces are required, causing the old comments to be wrongly displayed (sub-bullets displayed as bullets).

Thanks!

@creecros
Copy link
Owner

hmmm, this one might take me while to research. it's clearly not happening in parsedown, since parsedown alone is not the issue. it's all vendor libraries, so ill need some time to review and figure out which one is doing it.

@creecros
Copy link
Owner

creecros commented Mar 30, 2023

ya, so im not crazy in thinking this, and i will still look into it. But I never caught this because I don't think this is normal markdown behavior. I have always used 2 spaces to make a sublist, never 1.

* test
 * test
  • test
  • test

and as you can see above, 1 does not even work in github. So I could just as easy say that Kanboard has the issue.

So I guess it could actually be a parsedown problem, because Markdownplus is using the latest version, vs kanboard which uses an old ass version...

@oliviergenest
Copy link
Author

OK thanks for the feedback!
So probably I should better migrate all my database to "two spaces before star" instead of "one space before star".
I just need to find the proper regexp and SQL query 🙂

@creecros
Copy link
Owner

creecros commented Mar 30, 2023

I wouldn't go that far just yet. I'm still going to look into it and if it is a simple fix I might be able to do something. If however it requires me to alter a vendor library, it just comes down to a "should I" or "shouldn't I", as it means any libraries that need updating in the future no longer become as simple as composer update....if that makes sense.

@creecros
Copy link
Owner

creecros commented Mar 31, 2023

OK, so I can say that the difference is infact the difference between the parsedown versions. Kanboard uses Parsedown 1.7.4, MarkdownPlus uses Parsedown 1.8.0-beta-7

The blockListContinue() function logic is very different between the 2.

In 1.7.4, the sublist must be indented by at least one space more than the parent list item.

In 1.8.0-beta-7, the sublist must be indented by the length of the marker plus one space more than the parent list item.

Unfortunately, 1.8.0-beta-7 is the minimum version for parsdown-checkbox, so it is not an easy change, unless parsedown checkbox is either updated, or I make my own version that works with 1.7.4....I don't really want to do that tbh.

I will however keep the issue open, and add it to the Readme, so people will at least be aware of the difference.

I will offer a solution for you though, you can just edit the vendor library code yourself to change the indent requirement.

@oliviergenest
Copy link
Author

Thanks for the detailed analysis!
Your proposition seems reasonable.

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

No branches or pull requests

2 participants