comparison MoinMoin/formatter/text_docbook.py @ 5640:3cb7a64eaef5

fix pep8 failures
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 02 Apr 2010 19:54:22 +0200
parents 689e2b04bd4d
children cabef5f26ec5
comparison
equal deleted inserted replaced
5639:689e2b04bd4d 5640:3cb7a64eaef5
7 @copyright: 2005 by MoinMoin:Petr Pytelka <pyta@lightcomp.com> (small modifications) 7 @copyright: 2005 by MoinMoin:Petr Pytelka <pyta@lightcomp.com> (small modifications)
8 8
9 @license: GNU GPL, see COPYING for details. 9 @license: GNU GPL, see COPYING for details.
10 """ 10 """
11 11
12 import os,re 12 import os, re
13 13
14 from xml.dom import getDOMImplementation 14 from xml.dom import getDOMImplementation
15 from xml.dom.ext.reader import Sax 15 from xml.dom.ext.reader import Sax
16 from xml.dom.ext import Node 16 from xml.dom.ext import Node
17 17
609 609
610 elif name == "Include": 610 elif name == "Include":
611 was_in_para = self.cur.nodeName == "para" 611 was_in_para = self.cur.nodeName == "para"
612 if was_in_para: 612 if was_in_para:
613 self.paragraph(0) 613 self.paragraph(0)
614 614
615 # Regular Expression to match editlink arg, remove it because it causes trouble. 615 # Regular Expression to match editlink arg, remove it because it causes trouble.
616 _arg_editlink = r'(,\s*(?P<editlink>editlink))?' 616 _arg_editlink = r'(,\s*(?P<editlink>editlink))?'
617 macro_args = re.sub(_arg_editlink, '', args) 617 macro_args = re.sub(_arg_editlink, '', args)
618 618
619 text = FormatterBase.macro(self, macro_obj, name, macro_args) 619 text = FormatterBase.macro(self, macro_obj, name, macro_args)
620 if text.strip(): 620 if text.strip():
621 self._copyExternalNodes(Sax.FromXml(text).documentElement.childNodes, exclude=excludes) 621 self._copyExternalNodes(Sax.FromXml(text).documentElement.childNodes, exclude=excludes)
622 if was_in_para: 622 if was_in_para:
623 self.paragraph(1) 623 self.paragraph(1)