-
Notifications
You must be signed in to change notification settings - Fork 173
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
Nested list with markdown.lua
#162
Comments
I see that the gh Markdown parser is having difficulty as well with the nested lists, since they are indented past four spaces. I think we can make this work, but might need to edit the file itself? (Not sure if formatting changes to a legal license is acceptable) |
Personally, I have solved this by just linking to the GNU website containing an HTML of the said license. I will try to see how well different parsers cope with nested lists and will update this issue. |
I have the same issue as @gns-ank. Attempting to nest a list in a list using an indent of four spaces results in a code block. The Markdown syntax documentation on the Daring Fireball website does not contain an example of nesting a list in a list. I can fall back on HTML, but is there a way to nest lists in lists using markdown.lua, the Markdown processor supplied with LDoc 1.4.2? If not, does one of the other Markdown processors that I can use with LDoc support this? The GitHub Markdown processor supports nested lists:
|
I have the same problem. I’d like to use nested lists in my ldocs, but without success. |
There must be some sort of pre-processing that's messing this up before it hits the markdown parser. I was able to run with the lunamark processor, and if I copy-and-paste the exact same contents into an independent markdown file it renders correctly. Here are the input files I used for the comparison:
You can see from the diff that the files are nearly identical:
Command I ran:
Outputs:
When I look at the results, I see that (a) the nested list is flattened, and (b) some of the soft-wrapped lines have been converted to code blocks. But this isn't the case in the direct lunamark output, which suggests there's some sort of pre-processing going before the contents of the text are even hitting the markdown processor. This is with lunamark but I get similar results with the other markdown processors. |
The problem is here: https://github.com/stevedonovan/LDoc/blob/f91c3182cf0b3ac29a8f677491aa32493067b5e1/ldoc/markup.lua#L177 The code is using regular expressions to preprocess code blocks (either with As best I can tell, the purpose of the prettifier seems to be for code highlighting. I can think of a couple possible solutions to this:
|
I pushed a workaround here based on option (1) above. It would need a bit of CSS to get the code highlighting to show up in color, but otherwise it seems to be working. Not necessarily in a state I'd recommend merging, but it at least demonstrates that this can be done. |
Ok, I pushed a workaround based on (4) to #326. This makes it possible to set |
I have a problem with this file. It has many indented nested lists, but the parser tries to interpret those as code blocks, which is wrong.
How could I fix it?
The text was updated successfully, but these errors were encountered: