-
Notifications
You must be signed in to change notification settings - Fork 4
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
reverse_adoc: List item depth is dependent on context #68
Comments
This issue turns to be much harder to do, due to Coradoc structure being a single linked tree, but not only that. The incoming document is not semantic HTML - each list item is I have spent numerous hours pondering about the best solution for that and I suppose the best way to handle this issue will be in the linter, with linter having to reparse the document. If we go with that solution, we will have to have a complete parser that will be able to parse the entire incoming document. |
+1 on making this a preprocessing task of some kind: your software cannot be made to deal with all the inanity that people will come up with in their HTML, nor assume that the HTML you will see will be clean and well-structured. |
I don't have the exact HTML on hand to discuss. However, let's use the following sample HTML to demonstrate what I mean: <ul>
<ul><li>list item 1</li></ul>
<ul><li>list item 2</li></ul>
<ul>
<ul><li>list item 3</li></ul>
</ul>
</ul> I am purposefully ignoring CSS here. If you naively consider The corresponding AsciiDoc representation is:
In any case, it never becomes this (which is current behavior):
|
Then we have two different issues. The issue described in first post is specifically only for PLATEAU documents and this code is not generated from |
I used this command to test the document:
bundle exec reverse_adoc -rcoradoc/reverse_adoc/plugins/plateau --split-sections 2 --external-images -o plateau/index.adoc index.html
File:
plateau/sections/section-09/section-02.adoc
:In AsciiDoc, lists always start at the first level:
So this produced text is technically invalid AsciiDoc.
It should be:
The text was updated successfully, but these errors were encountered: