Skip to content

Commit d1fac83

Browse files
docs: fix syntax highlighting (#228)
We're using [`openqasm-pygments`](https://pypi.org/project/openqasm-pygments/) for syntax highlighting `openqasm3` in our docs. As this package contains a bug in lexing indented annotations, we're now using a custom version until the upstream [PR](openqasm/openqasm-pygments#12) is merged.
1 parent dc95f91 commit d1fac83

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

openqasm3_lexer/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from openqasm_pygments import OpenQASM2Lexer, OpenQASM3Lexer
1+
from openqasm_pygments.qasm2 import OpenQASM2Lexer
2+
from openqasm_pygments.qasm3 import OpenQASM3Lexer
23
from sphinx.application import Sphinx
34
from sphinx.highlighting import lexers
45

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ ignore_missing_imports = true
7777

7878
[tool.pytest.ini_options]
7979
asyncio_default_fixture_loop_scope = "function"
80+
81+
[tool.uv.sources]
82+
openqasm-pygments = { url = "https://github.com/LEQO-Framework/openqasm-pygments/releases/download/patch-annotation-lexing/openqasm_pygments-0.2.1a0-py3-none-any.whl" }

uv.lock

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)