Small tweak to expand results
This commit is contained in:
parent
818856a585
commit
84ae1933a1
|
@ -190,18 +190,17 @@ def parse(stream):
|
|||
for line in stream:
|
||||
line = line.strip('\n')
|
||||
if block is not False:
|
||||
result = parsebody(line, block)
|
||||
if result:
|
||||
block = result[0]
|
||||
doc.update(result[1])
|
||||
block, token = parsebody(line, block)
|
||||
if token:
|
||||
#block = result[0]
|
||||
doc.update(token)
|
||||
continue
|
||||
result = parseline(line)
|
||||
if result:
|
||||
block = result[0]
|
||||
if doc.token() == "TEXT" and result[1].token == "TEXT":
|
||||
doc.update(result[1].value)
|
||||
block, token = parseline(line)
|
||||
if token:
|
||||
if doc.token() == "TEXT" and token.token == "TEXT":
|
||||
doc.update(token.value)
|
||||
continue
|
||||
doc.append(result[1])
|
||||
doc.append(token)
|
||||
|
||||
for item in doc.filter('TEXT'):
|
||||
item.value = parse_text(item.value)
|
||||
|
|
Loading…
Reference in New Issue