Hi,
we've finally made a decision about the new names for the classes of the AST for which a PR is pending.
This post presents the proposed changes.
If anyone has any arguments against these names, this is the time and the place to bring them up.
On the left side you can see the old names, on the right side the new names:
AbstractNode ContentNode
+- AbstractBlock +- StructuralNode
| +- Block | +- Block
| +- Section => | +- Section
| +- Document (Class) | +- Document (Interface)
| +- ListNode | +- List
| +- ListItem | +- ListItem
| | +- Table
+- Inline +- PhrasingNode
We chose the name
ContentNode for the root node because they all contain content.
If you wonder about the name
PhrasingNode, it goes back to the term
phrasing content from the HTML5 specification:
http://www.w3.org/TR/html5/dom.html#phrasing-content: "Phrasing content is the text of the document, as well as elements that mark up that text at the intra-paragraph level."
StructuralNodes structure the document, so they markup the text at the inter-paragraph level.
There is actually no direct counterpart in HTML5, so-called
Flow Content is a super set of
Phrasing Content.
We moved from the term
Content to
Node to keep the relation to the T in AST.
This is currently implemented in the Pull Request
https://github.com/asciidoctor/asciidoctorj/pull/371Before merging we wanted to ask if anyone has objections against these names.
Once the PR is merged all extensions and converters depending on AsciidoctorJ 1.6.0-SNAPSHOT will no longer compile and have to adapt to these changes.
Best regards
Robert