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

Lists with sub-lists do not export to pdf correctly #229

Open
kawilliges opened this issue Apr 29, 2020 · 1 comment
Open

Lists with sub-lists do not export to pdf correctly #229

kawilliges opened this issue Apr 29, 2020 · 1 comment

Comments

@kawilliges
Copy link

Prerequisites

Issue description

List with sub-lists do not seem to function correctly past 2 levels of indentation / sub-listings. See example below:

Steps to reproduce

Input the following text into a .md document and convert to pdf.

1. Item 1.
  * Point 1.
    * Sub-point of 1.
2. Item 2.
  * Another point.
    * And a final sub-point  

Expected behavior: [What you expect to happen]
Output should look like (and appears so in markdown preview):

1. Item 1.
  * Point 1.
     - Sub-point of 1.
2. Item 2.
  * Another point.
     - And a final sub-point

Actual behavior: [What actually happens]
But output instead looks like:

1. Item 1.
  * Point 1.
  * Sub-point of 1.
2. Item 2.
  * Another point.
  * And a final sub-point

Input

.md contains relatively sensitive material

Versions

Mac OS, version 10.14.6
Atom: 1.45.0
Electron: 4.2.7
Chrome: 69.0.3497.128
Node: v10.11.0

@kawilliges
Copy link
Author

Of course, immediately after submitting, I encountered the solution. Github markdown seems to only need 2 spaces / a tab to indent each sub-list; but for markdown-pdf, an additional space (*a total of 3 spaces) are needed to get the sub-lists to correctly display in the pdf. Like so:

  1. Item 1.
    --Item 1 (2 spaces preceeding)
    -----
    Sub-item 1. (5 spaces preceeding)

and so on.

Not sure if this is by design, or was well-known and i missed it in the documentation / prior issues, but i'll leave it to be closed by the creator.

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

1 participant