Read raw contents via key names, not positions.
This commit is contained in:
parent
d00937c6eb
commit
52d8cf59ce
@ -550,11 +550,10 @@ class Headline:
|
|||||||
|
|
||||||
def get_contents(self, format):
|
def get_contents(self, format):
|
||||||
if format == "raw":
|
if format == "raw":
|
||||||
lines = []
|
yield from map(
|
||||||
for line in self.contents:
|
lambda x: token_list_to_raw(x.contents),
|
||||||
lines.append(dump_contents(line))
|
sorted(self.contents, key=lambda x: x.linenum),
|
||||||
|
)
|
||||||
yield from map(lambda x: x[1], sorted(lines, key=lambda x: x[0]))
|
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user