CodeFileTreeNode.py
changeset 1766 c1e5b9f19483
parent 1758 845ca626db09
child 1767 c74815729afd
equal deleted inserted replaced
1765:ccf59c1f0b45 1766:c1e5b9f19483
   111 
   111 
   112             codefile_xml = codefile_xml.replace(
   112             codefile_xml = codefile_xml.replace(
   113                 '<%s>' % self.CODEFILE_NAME,
   113                 '<%s>' % self.CODEFILE_NAME,
   114                 '<%s xmlns:xhtml="http://www.w3.org/1999/xhtml">' % self.CODEFILE_NAME)
   114                 '<%s xmlns:xhtml="http://www.w3.org/1999/xhtml">' % self.CODEFILE_NAME)
   115             for cre, repl in [
   115             for cre, repl in [
   116                 (re.compile("(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
   116                     (re.compile("(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
   117                 (re.compile("(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
   117                     (re.compile("(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
   118                 codefile_xml = cre.sub(repl, codefile_xml)
   118                 codefile_xml = cre.sub(repl, codefile_xml)
   119 
   119 
   120             try:
   120             try:
   121                 self.CodeFile, error = self.CodeFileParser.LoadXMLString(codefile_xml)
   121                 self.CodeFile, error = self.CodeFileParser.LoadXMLString(codefile_xml)
   122                 if error is not None:
   122                 if error is not None: