diff --git a/sphinx_design/badges_buttons.py b/sphinx_design/badges_buttons.py index 8026297..1e858bf 100644 --- a/sphinx_design/badges_buttons.py +++ b/sphinx_design/badges_buttons.py @@ -178,11 +178,8 @@ def run(self) -> List[nodes.Node]: node["reftitle"] = self.options["tooltip"] # TODO escape HTML if self.content: - textnodes, _ = self.state.inline_text( - "\n".join(self.content), self.lineno + self.content_offset - ) - content = nodes.inline("", "") - content.extend(textnodes) + content = nodes.paragraph() + self.state.nested_parse(self.content, self.content_offset, content) else: content = nodes.inline(target, target) node.append(content) @@ -195,7 +192,6 @@ def run(self) -> List[nodes.Node]: # `visit_reference` requires that a reference be inside a `TextElement` parent container = nodes.paragraph(classes=self.options.get("align", [])) - self.set_source_info(container) container += node return [container]