mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
markdown: Parse included blocks in a new parser state.
This fixes inclusion of a multi-paragraph file into a list item.
Followup to commit dc33a0ae67 (#22315).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
a2e1d61172
commit
869fe60689
@@ -47,7 +47,9 @@ class IncludeBlockProcessor(BlockProcessor):
|
|||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
def run(self, parent: Element, blocks: List[str]) -> None:
|
def run(self, parent: Element, blocks: List[str]) -> None:
|
||||||
blocks[:1] = self.RE.sub(self.expand_include, blocks[0]).split("\n\n")
|
self.parser.state.set("include")
|
||||||
|
self.parser.parseChunk(parent, self.RE.sub(self.expand_include, blocks.pop(0)))
|
||||||
|
self.parser.state.reset()
|
||||||
|
|
||||||
|
|
||||||
def makeExtension(base_path: str) -> IncludeExtension:
|
def makeExtension(base_path: str) -> IncludeExtension:
|
||||||
|
|||||||
Reference in New Issue
Block a user