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

Paragraphs in nested lists not handled correctly #112

Closed
ralismark opened this issue Jan 28, 2023 · 2 comments
Closed

Paragraphs in nested lists not handled correctly #112

ralismark opened this issue Jan 28, 2023 · 2 comments

Comments

@ralismark
Copy link

Running lowdown -sT man --nroff-nolinks -M sections=1 -o foo.1 with the following markdown input:

- list

  with paragraph

  - inner list

    inner para

produces a manpage that looks like this, with incorrect indenting for the paragraph in the inner list:

       • list

         with paragraph

         • inner list

         inner para

To make it look correct, the resulting troff file needs this change:

 .\" -*- mode: troff; coding: utf-8 -*-
 .TH "Untitled article" "7" ""
 .IP "\(bu" 2
 list
 .IP
 with paragraph
 .RS
 .IP "\(bu" 2
 inner list
-.RE
 .IP
 inner para
+.RE
@ralismark ralismark changed the title Paragraphs in nested lists not handled correctly. Paragraphs in nested lists not handled correctly Jan 28, 2023
@kristapsdz
Copy link
Owner

This actually looks to be a bug within the parser, not the output! Adding an extra space in front of "inner para" will trigger the correct behaviour. An interesting bug indeed... I'll have a fix when I track down the culprit. Thank you!

@kristapsdz
Copy link
Owner

Ok, it turns out that this isn't an error. To quote the syntax guide:

List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab

The sample you've given doesn't do that. By using four spaces, this is just fine. I'm closing this, but to be honest, I don't like it... markdown should handle any number of spaces.

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