Fix support of code blocks outside headlines.
Some checks failed
Some checks failed
This commit is contained in:
parent
8280949f23
commit
9c04717a12
@ -2307,6 +2307,7 @@ class OrgDoc:
|
|||||||
list_items,
|
list_items,
|
||||||
structural,
|
structural,
|
||||||
properties,
|
properties,
|
||||||
|
delimiters,
|
||||||
environment=BASE_ENVIRONMENT,
|
environment=BASE_ENVIRONMENT,
|
||||||
):
|
):
|
||||||
self.todo_keywords = [HeadlineState(name=kw) for kw in DEFAULT_TODO_KEYWORDS]
|
self.todo_keywords = [HeadlineState(name=kw) for kw in DEFAULT_TODO_KEYWORDS]
|
||||||
@ -2336,6 +2337,7 @@ class OrgDoc:
|
|||||||
self.list_items: List[ListItem] = list_items
|
self.list_items: List[ListItem] = list_items
|
||||||
self.structural: List = structural
|
self.structural: List = structural
|
||||||
self.properties: List = properties
|
self.properties: List = properties
|
||||||
|
self.delimiters: List = delimiters
|
||||||
self._path = None
|
self._path = None
|
||||||
self.headlines: List[Headline] = list(
|
self.headlines: List[Headline] = list(
|
||||||
map(lambda hl: parse_headline(hl, self, self), headlines)
|
map(lambda hl: parse_headline(hl, self, self), headlines)
|
||||||
@ -2500,6 +2502,9 @@ class OrgDoc:
|
|||||||
for struct in self.structural:
|
for struct in self.structural:
|
||||||
lines.append(dump_structural(struct))
|
lines.append(dump_structural(struct))
|
||||||
|
|
||||||
|
for content in self.delimiters:
|
||||||
|
lines.append(dump_delimiters(content))
|
||||||
|
|
||||||
for kw in self.keywords:
|
for kw in self.keywords:
|
||||||
lines.append(dump_kw(kw))
|
lines.append(dump_kw(kw))
|
||||||
|
|
||||||
@ -2537,6 +2542,7 @@ class OrgDocReader:
|
|||||||
self.list_items,
|
self.list_items,
|
||||||
self.structural,
|
self.structural,
|
||||||
self.properties,
|
self.properties,
|
||||||
|
self.delimiters,
|
||||||
self.environment,
|
self.environment,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user