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 on list items #264

Closed
inode- opened this issue Nov 7, 2022 · 2 comments
Closed

Bug on list items #264

inode- opened this issue Nov 7, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@inode-
Copy link

inode- commented Nov 7, 2022

On an issue having a list with multiple sublevel is not correctly reported into the word documents.

For example on the HTML editor I got:

pluto

  • a
    • b
      • c
      • f
    • d
      • e
      • g
<p><span class="bold">pluto</span></p>
<ul>
<li><span class="bold">a</span>
<ul>
<li><span class="bold">b</span>
<ul>
<li><span class="bold">c</span></li>
<li><span class="bold">f</span></li>
</ul>
</li>
<li><span class="bold">d</span>
<ul>
<li><span class="bold">e</span></li>
<li><span class="bold">g</span></li>
</ul>
</li>
</ul>
</li>
</ul>

The docx report will get this structure:

pluto

  • a
    • b
      • c
      • f
      • d
        • e
        • g
@inode- inode- added the bug Something isn't working label Nov 7, 2022
@chrismaddalena
Copy link
Collaborator

Thanks fore reporting this, @inode-. I'll look into it this week when I have some time. It should be a simple thing.

@chrismaddalena
Copy link
Collaborator

I had to revisit some code I wrote two or three years ago, so that was an adventure. I refactored HTML list processing to make it much more straightforward. I tested it with many indentation changes, formatting, and nested elements. Everything looks good in the output, so the change will be in the next release.

Word Rendering

image

WYSIWYG HTML

<p>Single list item:</p>
<ul>
<li>Level 1</li>
</ul>
<p>Multiple nested list items:</p>
<ul>
<li>Level 1</li>
<li>Level 2
<ul>
<li>Level 2, a</li>
<li>Level 2, b
<ul>
<li>Level 2, i</li>
<li>Level 2, ii
<ul>
<li>Level 2, a</li>
</ul>
</li>
<li>Level 2, iii</li>
</ul>
</li>
<li>Level 2, c</li>
</ul>
</li>
<li>Level 3
<ul>
<li>Level 3, a</li>
</ul>
</li>
<li>Level 4</li>
</ul>
<p>Multiple nested list items with tested tags:</p>
<ul>
<li><span class="bold">Level <span class="italic">1</span></span> (Bold + Bolt Italic num)<span class="bold"><span class="italic"><br /></span></span></li>
<li><span class="bold"><span class="italic">Level</span> </span><span class="italic">2</span> (Italic Bold + italic num)
<ul>
<li>Level 2, <span class="underline">a (Underlined after comma)<br /></span></li>
<li>Level 2, b
<ul>
<li>Level 2, i – hyperlink: <span class="italic">Italic</span>, <span class="italic">Italic</span>, <a href="https://github.com/GhostManager/Ghostwriter">https://github.com/GhostManager/Ghostwriter</a></li>
<li>Level 2, ii
<ul>
<li>Level 2, a – hyperlink: <span class="italic bold">Bold Italic</span>, <span class="underline bold">Bold Underlined</span>, <span class="underline"><a href="https://www.ghostwriter.wiki/getting-started/quickstart">https://www.ghostwriter.wiki/getting-started/quickstart</a></span></li>
</ul>
</li>
<li>Level 2, iii – New font: <span style="font-family: terminal, monaco;">Terminal</span></li>
</ul>
</li>
<li>Level 2, c</li>
</ul>
</li>
<li>Level 3
<ul>
<li>Level 3, a</li>
</ul>
</li>
<li>Level 4</li>
</ul>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants