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

[Bug] Nested lists have invalid indents #57

Open
Mtillmann opened this issue Oct 26, 2023 · 2 comments
Open

[Bug] Nested lists have invalid indents #57

Mtillmann opened this issue Oct 26, 2023 · 2 comments

Comments

@Mtillmann
Copy link

Hi, I encountered this issue:

  const markup = `
      <ul>
          <li>a
              <ul>
                  <li>b
                      <ul>
                          <li>c</li>
                      </ul>
                  </li>
              </ul>
          </li>
      </ul>
  `;

  md = NodeHtmlMarkdown.translate(markup);
  console.log(md);

Expected output:

* a
  * b
    * c

However, the lib generates:

* a
   * b
         * c

Instead of the config.js default of 2 spaces for indentation it uses 3 AND the third level of depth (c) is indentend with 9 (3x3) spaces. Am I missing something or is this a bug?

@nonara
Copy link
Collaborator

nonara commented Oct 30, 2023

Hi Martin! I understand why it would be doing that, but I agree that it isn't ideal. I will get a fix in.

Thanks for the report!

@nonara nonara changed the title list issue [Bug] Nested lists have invalid indents Oct 30, 2023
@ElectricCodeGuy
Copy link

Any news on this? :)

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

3 participants