Skip to content

Commit

Permalink
changed regex strings to raw strings
Browse files Browse the repository at this point in the history
  • Loading branch information
briandrawert committed Sep 19, 2024
1 parent 21d46e0 commit 78b5ee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gillespy2/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,8 @@ def to_string(self):
doc = eTree.tostring(self.document)
xmldoc = xml.dom.minidom.parseString(doc)
ugly_xml = xmldoc.toprettyxml(indent=' ')
text_re = re.compile(">\n\s+([^<>\s].*?)\n\s+</", re.DOTALL)
pretty_xml = text_re.sub(">\g<1></", ugly_xml)
text_re = re.compile(r">\n\s+([^<>\s].*?)\n\s+</", re.DOTALL)
pretty_xml = text_re.sub(r">\g<1></", ugly_xml)
return pretty_xml

def __species_to_element(self, species):
Expand Down

0 comments on commit 78b5ee4

Please sign in to comment.