Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 FIX: i18n of buttons #175

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
TheTripleV marked this conversation as resolved.
Show resolved Hide resolved
container += node

return [container]
Expand Down