added functionality to handle comment Node
bzr revid: nch@tinyerp.com-20090525064245-swbzaetxrmgm32zo
This commit is contained in:
@@ -12,6 +12,8 @@ class report(object):
|
||||
_regex2 = re.compile("\[\[(.*?)(removeParentNode\(\s*(?:['\"](.*?)['\"])\s*\))(.*?)\]\]")
|
||||
_regex3 = re.compile("\[\[\s*(.*?setTag\(\s*['\"](.*?)['\"]\s*,\s*['\"].*?['\"]\s*(?:,.*?)?\).*?)\s*\]\]")
|
||||
for node in root_node:
|
||||
if node.tag == etree.Comment:
|
||||
continue
|
||||
if node.text:
|
||||
def _sub3(txt):
|
||||
n = node
|
||||
|
||||
@@ -495,6 +495,9 @@ class _rml_flowable(object):
|
||||
|
||||
flow = []
|
||||
for n in utils._child_get(td, self):
|
||||
if n.tag == etree.Comment:
|
||||
n.text = ''
|
||||
continue
|
||||
fl = self._flowable(n, extra_style=paraStyle)
|
||||
if isinstance(fl,list):
|
||||
flow += fl
|
||||
@@ -676,6 +679,9 @@ class _rml_flowable(object):
|
||||
def process_story(node_story):
|
||||
sub_story = []
|
||||
for node in utils._child_get(node_story, self):
|
||||
if node.tag == etree.Comment:
|
||||
node.text = ''
|
||||
continue
|
||||
flow = self._flowable(node)
|
||||
if flow:
|
||||
if isinstance(flow,list):
|
||||
|
||||
Reference in New Issue
Block a user