Skip to content

Commit

Permalink
Merge pull request #268 from Holzhaus/fix-hwlabel-ampersand
Browse files Browse the repository at this point in the history
sphinx-mixxx: Fix usage of ampersand in hwlabel role
  • Loading branch information
ronso0 authored Oct 30, 2020
2 parents aa9aa1d + 5f7cbb9 commit 1050b2e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sphinx-mixxx/sphinx_mixxx/roles.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
from sphinx.roles import GUILabel
from typing import List, Tuple

from docutils import nodes
from sphinx.roles import SphinxRole

class HWLabel(GUILabel):

class HWLabel(SphinxRole):
"""Label on external hardware (such as controllers)."""

def run(self) -> Tuple[List[nodes.Node], List[nodes.system_message]]:
node = nodes.inline(rawtext=self.rawtext, classes=[self.name])
node += nodes.Text(self.text)
return [node], []


specific_docroles = {
"hwlabel": HWLabel(),
Expand Down

0 comments on commit 1050b2e

Please sign in to comment.