Skip to content

Page break on <li> or at least on nested <ol> or <ul> #18

@marcelgolias

Description

@marcelgolias

Would it please be possible to modify the script so that there could be a page break even for nested <ol> or <ul> elements?
For example:
<ul>
<li></li>
<li>
<p></p>
<div>
<ol>
<li></li>
<li></li>
</ol>
</div>
</li>
</ul>
Now when I have some long text with bullets (ol/ul) that are nested inside other bullets, the page doesn't break properly, or I have unnecessarily long spaces there.
I tried to add li inside your script like this:
snippets = pages[p].querySelectorAll("h1, h2, h3, h4, h5, h6, p, ul, ol, li");
but that does't work because in the resulting HTML code then those <li> elements are not wrapped in corresponding <ul> or <ol>.
I would be really grateful if you could get this problem resolved.
Thank you very much in advance for any reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions