cfpb/regulations-parser — pull request #178 by khandelwal (2014-01-20 23:47:01+00:00)
Title: Regulation compilation: Z notice changes

Working my way through the Z notices, I needed to change some of the regulation compilation code to deal with specific situations. In particular changes were made:

* To better handle section parsing ambiguity issues (these are the changes in find_candidate())
* Create empty nodes in the tree during compilation. This allows the parser to move forward if a parent is not available. In certain cases, we'd flush out the parent during patching.
* Notice XML is poorly formatted. Sometimes the

for an might be in the next . Gracefully handle that scenario.
* Also, don't mark a node as deleted when it's actually deleting a character or a sentence.

This needs a couple more tests, but I'd really just like to get this. Maybe it'll help get out of the sea of despair that is notice parsing.