Shinmera / plump

Practically Lenient and Unimpressive Markup Parser for Common Lisp
https://shinmera.github.io/plump
zlib License
119 stars 21 forks source link

Escape XML characters #6

Closed ruricolist closed 9 years ago

ruricolist commented 9 years ago

This is a very preliminary pull request to give some focus to the discussion in #3.

I've used simple errors here, to keep things obvious, but if something like this is going to be part of the API then the errors should be signaled as distinguished conditions.

I don't understand the usefulness of distinguishing between disallowed and discouraged characters. Discouraged characters are discouraged for very good reason -- most parsers don't support them -- CXML, for example, or anything that uses libxml2. It would also at least double the number of tests per character.

This is just a starting point; I'm happy to make any further changes.

Shinmera commented 9 years ago

Fixed another way.