Targeted at solving #12 in a basic, legacy-supporting way. Adds Document type, document parser, runDocument parsing command, and documentToString un-parsing command. It also splits up the nodeToString parsing function into more general pieces, which are re-used in documentToString.
I also made a slight change to the comment-to-string conversion because it was adding spaces to the HTML comments if I parsed a document then to-stringed it then parsed the string again. Now it doesn't do that and, as far as I can tell, still matches the HTML living standard.
Targeted at solving #12 in a basic, legacy-supporting way. Adds
Document
type,document
parser,runDocument
parsing command, anddocumentToString
un-parsing command. It also splits up thenodeToString
parsing function into more general pieces, which are re-used indocumentToString
.I also made a slight change to the comment-to-string conversion because it was adding spaces to the HTML comments if I parsed a document then to-stringed it then parsed the string again. Now it doesn't do that and, as far as I can tell, still matches the HTML living standard.
Fixes #12.