-
Notifications
You must be signed in to change notification settings - Fork 5
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
Inline structures (literals and roles) #21
Conversation
--HG-- rename : rst2rst/tests/__init__.py => rst2rst/tests/test_fixtures.py
this way, removals and additions show the *errors* in the current output
Allows checking multiple failing fixtures, and better reporting on tests count.
better to fail on them, if no-behavior is desirable should extend SparseNodeVisitor instead
At this point, the test case completely fails:
|
I feel the writer uses wrong design to rebuild the document out of the nodes:
As examples:
I feel that this design would make the writer much easier to implement... provided we find a readable way to do this. I once tried to implement it for the lists... but failed to get it quickly :( |
Yes I've got similar issues, it feels like trying to hammer round pegs in square holes.
And requires lots of odd special cases, it also makes things much less composable: "parent" nodes need to set up odd contexts in order to get their children to (unwittingly) do the right things, it's very brittle.
Yeah I started going that way (paragraph was the only one applying wrapping after collecting its children), but I think I was in too deep (and had broken all vertical spacing between paragraphs and paragraph-containing nodes) so I reverted everything. Spacers actually ended up being a much bigger problem than line-wrapping: most block-level nodes (all of them but titles IIRC) don't hold text directly but hold paragraphs which do the text-holding (for all inline structures), so if the paragraph can capture its inline content it can easily wrap everything cleanly. But the interaction of spacers between nested block-level nodes didn't work out.
Worth a try |
Builds on #19.