Skip to content

Commit

Permalink
Made "-x" do what it claims to do.
Browse files Browse the repository at this point in the history
Added "--liberal-xml-parser" to do the rest of what "-x" used to do.

--HG--
extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401258
  • Loading branch information
philiptaylor committed Jan 13, 2009
1 parent e4021af commit dfe2f12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def parse():
else:
tokenizer = HTMLTokenizer

if opts.xml:
if opts.liberalxml:
p = liberalxmlparser.XHTMLParser(tree=treebuilder, tokenizer=tokenizer)
else:
p = html5parser.HTMLParser(tree=treebuilder, tokenizer=tokenizer)
Expand Down Expand Up @@ -196,6 +196,9 @@ def getOptParser():
parser.add_option("", "--sanitize", action="store_true", default=False,
dest="sanitize", help="sanitize")

parser.add_option("", "--liberal-xml-parser", action="store_true", default=False,
dest="liberalxml", help="parse with liberal xml parser")

return parser

if __name__ == "__main__":
Expand Down

0 comments on commit dfe2f12

Please sign in to comment.