diff --git a/myst_parser/mdit_to_docutils/base.py b/myst_parser/mdit_to_docutils/base.py index 6631a711..0b78c2de 100644 --- a/myst_parser/mdit_to_docutils/base.py +++ b/myst_parser/mdit_to_docutils/base.py @@ -582,12 +582,15 @@ def render_blockquote(self, token: SyntaxTreeNode) -> None: self.add_line_and_source_path(quote, token) with self.current_node_context(quote, append=True): self.render_children(token) - if "attribution" in token.attrs: - attribution = nodes.attribution( - token.attrs["attribution"], "", nodes.Text(token.attrs["attribution"]) - ) - self.add_line_and_source_path(attribution, token) - quote.append(attribution) + if "attribution" in token.attrs: + attribution = nodes.attribution(token.attrs["attribution"], "") + self.add_line_and_source_path(attribution, token) + with self.current_node_context(attribution, append=True): + self.nested_render_text( + str(token.attrs["attribution"]), + token_line(token, 0), + inline=True, + ) def render_hr(self, token: SyntaxTreeNode) -> None: node = nodes.transition() diff --git a/tests/test_renderers/fixtures/attributes.md b/tests/test_renderers/fixtures/attributes.md index e14175a1..59b780a0 100644 --- a/tests/test_renderers/fixtures/attributes.md +++ b/tests/test_renderers/fixtures/attributes.md @@ -16,7 +16,7 @@ c = 3 blockquote . -{attribution="Chris Sewell"} +{attribution="Chris Sewell [link](https://source.com)"} > Hallo . @@ -25,6 +25,8 @@ blockquote Hallo Chris Sewell + + link . list-style