Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unfortuantely, this breaks text output. I'll have to fix that sometime soon, but it will be a good opportunity to implement text wrapping anyway. This was annoyingly difficult. There are two main changes: First, a new subclass of ListBuilder, ItemBuilder is now used to wrap the inner content of lists--the contained phrases in most cases. This list builder determines when other ListBuilders can be appended to the content, since sub-lists should be nested under items. Second, all of the HTML output now goes through ListBuilder and to_html is no longer called on the parsed SyntaxNodes. This is because ListBuilder needed to add item tags (e.g., <li>) to each level in addition to the list type tags (<ul>). Instead of adding parameters to ListBuilder to make this work, ListBuilder is now subclassed for each list type and those subclasses take care of knowing how to render the correct HTML tags. This will probably work out well when I go back to reimplement the text formatting.
- Loading branch information
Showing
2 changed files
with
90 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters