diff --git a/src/docgen/KwordDoc.py b/src/docgen/KwordDoc.py index 9a4370041..e05dfa977 100644 --- a/src/docgen/KwordDoc.py +++ b/src/docgen/KwordDoc.py @@ -437,7 +437,24 @@ class KwordDoc(TextDoc.TextDoc): pass def write_text(self,text): - text = string.replace(text,'&','&'); # Must be first + text = text.replace('&','&'); # Must be first + text = text.replace('<','<'); + text = text.replace('>','>'); + + pos = text.find('<super>') + if pos >= 0: + self.start_pos = len(self.text)+pos + text = text.replace('<super>','') + pos = text.find('</super>') + if pos >= 0: + end = len(self.text)+pos - self.start_pos + text = text.replace('<super>','') + + txt = '\n' % (self.start_pos, end) + txt = txt + '\n' + text = text.replace('</super>','') + self.format_list.append(txt) + self.text = self.text + text Plugins.register_text_doc(_("KWord"),KwordDoc,1,1,1,".kwd")