CodeFileTreeNode.py
changeset 2439 f0a040f1de1b
parent 2434 07f48018b6f5
child 2523 aa7f138648f3
equal deleted inserted replaced
2438:0f2e5303f212 2439:f0a040f1de1b
   112 
   112 
   113             codefile_xml = codefile_xml.replace(
   113             codefile_xml = codefile_xml.replace(
   114                 '<%s>' % self.CODEFILE_NAME,
   114                 '<%s>' % self.CODEFILE_NAME,
   115                 '<%s xmlns:xhtml="http://www.w3.org/1999/xhtml">' % self.CODEFILE_NAME)
   115                 '<%s xmlns:xhtml="http://www.w3.org/1999/xhtml">' % self.CODEFILE_NAME)
   116             for cre, repl in [
   116             for cre, repl in [
   117                     (re.compile("(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
   117                     (re.compile(r"(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
   118                     (re.compile("(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
   118                     (re.compile(r"(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
   119                 codefile_xml = cre.sub(repl, codefile_xml)
   119                 codefile_xml = cre.sub(repl, codefile_xml)
   120 
   120 
   121             try:
   121             try:
   122                 self.CodeFile, error = self.CodeFileParser.LoadXMLString(codefile_xml)
   122                 self.CodeFile, error = self.CodeFileParser.LoadXMLString(codefile_xml)
   123                 if error is not None:
   123                 if error is not None: