Wednesday, May 21, 2008

more work on HTML prettyprint

today did not have chance to work on HTML pretty print was going to first lay out all the "text" and "tail" in a line seperated by the "whitespace preserving" tags
text tail text tail text text <whitespace preserving> text tail <whitespace preserving> text tail
then we have the: 1) empties 2) only whitespace 3) printing characters 4) printing characters with some whitespace at ends we only care about the whitespace that seperates printing characters, for the most part, printing characters in the "text" and seperating whitespace in the immediately following "tail" might be too much work, but, I would not be surprised if ran into issue later (all this work is not in vain, also I will need such stuff when I start programmically generating Python code, to compare my Python bytecode generation against Python's own, against the same algorithm, because of the work I am planning to do with AST, either Python's own in 2.6, or my own form)

No comments: