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

Is there a way to have a bullet for each level of indentation in nested lists? #446

Open
oscadev opened this issue Aug 18, 2023 · 2 comments

Comments

@oscadev
Copy link

oscadev commented Aug 18, 2023

Right now, it correctly indents doe nested ul lists, but it only adds one bullet instead of one for each level. For example:

<ul>
          <li>item 1</li>
          <li>item 2</li>
          <ul>
                  <li/>sublist item 1</li>
          </ul>
<ul/>

produces:

  • item 1
  • item 2
    • sublist item 1

When it should (or I would like it to) produce:

  • item 1
  • item 2
    • sublist item 1

I have even tried running str.replace(" ", "* ") but the string replace cannot pickup those gaps even if I copy and paste them from the console log. I would be content with either a way to to it inside the turndown options, or even getting the replace to work. Any thoughts?

@za3k
Copy link

za3k commented Jul 16, 2024

What does doe nested mean? The above example is not valid HTML. <ul> must be inside an <li> block, not directly inside another <ul> block.

@xuli-cooly
Copy link

But the indented content after rich text editing is like this.

  • 111
    • 2222
    • 3333
.The ideal rule is to increment the count by 2 when encountering a ul, and when encountering an li, to retrieve the content, where the number of spaces in the front end equals the count, followed by a line break.

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