attakei / sphinx-revealjs

HTML Presentation builder for Pythonista
https://attakei.github.io/sphinx-revealjs/
Apache License 2.0
109 stars 19 forks source link

Nested Lists Aren't Rendered Correctly #161

Closed ens-scmeeu closed 7 months ago

ens-scmeeu commented 7 months ago

I am using version 2.9.3 with sphinx 7.2.6.

This example slide:

Indent Test
-----------

* This should not be indented
* This should not be indented either
   * This should be indented as child of the line above

is rendered as this HTML:

<section>
  <h3>Indent Test</h3>
  <ul class="simple">
    <li>
      <p>This should not be indented</p>
    </li>
    <li>
      <dl class="simple">
        <dt>This should not be indented either</dt>
        <dd>
          <ul>
            <li>
              <p>This should be indented as child of the line above</p>
            </li>
          </ul>
        </dd>
      </dl>
    </li>
  </ul>
</section>

When rendered in the browser, the 2nd line doesn't show as a bullet at all and since it is missing the <p> tag, it is also not inheriting paragraph CSS styling. Most importantly, I don't think this 2nd line should be a part of the nested list, only the line beneath it, so it should be a plain <li> line the line above it. Due to this last part the 2nd line isn't rendering as a part of the list at all and isn't correctly aligned with the line above.

If this IS the desired rendering, then renderjs itself certainly doesn't like it, and with default CSS of the builtin themes certainly doesn't render it in any desirable way.

Rendering it this way, for example, results in the desired rendering in a browser:

<section>
  <h3>Indent Test</h3>
  <ul class="simple">
    <li>
      <p>This should not be indented</p>
    </li>
    <li>
        <p>This should not be indented either</p>
          <ul>
            <li>
              <p>This should be indented as child of the line above</p>
            </li>
          </ul>
    </li>
  </ul>
</section>
attakei commented 7 months ago

This is for spec of reStructuredText, and not issue about sphinx-revealjs.

You should blank between parent and child if you want to write nested list.

Indent Test
-----------

* This should not be indented
* This should not be indented either

   * This should be indented as child of the line above

Please see Sphinx docs.

ens-scmeeu commented 7 months ago

Ahh...nice. I'm admittedly new to reStructuredText. That renders better, but puts it in a <blockquote>. Anyway to have it not do that?

attakei commented 7 months ago

Sorry , prev my example is included unnecessary space. Try this.

Indent Test
-----------

* This should not be indented
* This should not be indented either

  * This should be indented as child of the line above
ens-scmeeu commented 7 months ago

Perfect, thanks so much for the help. Will close this out.