mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +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 commitdc33a0ae67(#22315). Signed-off-by: Anders Kaseorg <anders@zulip.com> (cherry picked from commit869fe60689)
This commit is contained in:
committed by
Tim Abbott
parent
e61ffc5bd7
commit
3f0919cc65
@@ -47,7 +47,9 @@ class IncludeBlockProcessor(BlockProcessor):
|
||||
return "\n".join(lines)
|
||||
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user