-
Notifications
You must be signed in to change notification settings - Fork 22
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
Minor issue with nested lists #70
Comments
I can confirm the issue. |
Yes, I'm working on it while also fixing https://github.com/weaverryan/docs-builder/issues/38 . Unfortunately, lists is implemented completely differently from definition lists, so I first have to investigate if we can safely rewrite it to be the same. |
doctrine/rst-parser#143 is now merged, this should be fixed now. |
It works great! Thank you. |
Although the main problem was fixed, there's still a minor thing to consider. Before, nested lists were parsed like this: <ul class="...">
<li>
Events related to Doctrine entities:
<ul>
<li><code class="...">AfterEntityBuiltEvent</code></li>
<li><code class="...">AfterEntityDeletedEvent</code></li>
<li><code class="...">AfterEntityPersistedEvent</code></li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul> Now they are parsed like this: <ul>
<li>
<p>Events related to Doctrine entities:</p>
<ul>
<li><code class="...">AfterEntityBuiltEvent</code></li>
<li><code class="...">AfterEntityDeletedEvent</code></li>
<li><code class="...">AfterEntityPersistedEvent</code></li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul> The |
Hi @javiereguiluz! I followed the behavior of Python Sphinx here: if there is only 1 paragraph in a list item, the We can change it as we wish, but as it's a generic library I want to stay close to Sphinx. Optionally, if we finally implement node visitors, we might be able to make these tweaks in this library. |
OK, but symfony.com, which still uses Sphinx, doesn't show the |
Oh, that's interesting. I'll check somewhere today with the rst-parser test suite |
@javiereguiluz I cannot reproduce locally using Sphinx 1.8.5 (which should be the version used on symfony.com):
|
OK, let's close this because Wouter explained the tech reasons behind this ... and we've tweaked the design a bit to neutralize this change. Thanks! |
In this file -> https://github.com/EasyCorp/EasyAdminBundle/blob/master/doc/events.rst we have this:
This is the right way to create nested lists for Sphinx (so I guess it's the right way in RST in general too). That includes the blank lines after the first level bullets. In the current parser it works OK, but in the new parser it generates this wrong HTML:
As you can see, the nested
<ul>
is outside of the<li>
, but it should be inside of it.The text was updated successfully, but these errors were encountered: