Skip to content

Commit

Permalink
Fix i18n of buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTripleV authored Dec 29, 2023
1 parent a9e41c4 commit 77d9a46
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sphinx_design/badges_buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
Expand Down

0 comments on commit 77d9a46

Please sign in to comment.