Skip to content

Commit

Permalink
Merge pull request #16 from allrob23/master
Browse files Browse the repository at this point in the history
Set isfinal to true in XML parser for proper resource cleanup
  • Loading branch information
pamoller authored Oct 22, 2024
2 parents 57b50f5 + b6241e8 commit fc1826b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xmlformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def enc_output(self, path, strg):
def format_string(self, xmldoc=""):
""" Format a XML document given by xmldoc """
token_list = Formatter.TokenList(self)
token_list.parser.Parse(xmldoc)
token_list.parser.Parse(xmldoc, True)
return self.enc_encode(str(token_list))

def format_file(self, file):
Expand Down

0 comments on commit fc1826b

Please sign in to comment.