code-block-hl directive, just like code-block but with partial line highlights
Project description
Sphinx Code Highlighter Directive
A Sphinx directive that works just like a code-block plus allows you to highlight partial lines.
Examples
Using MyST markdown:
```{code-block-hl} python
:linenos:
:caption: "The text surrounded by `!!!` gets highlighted."
dwarves = [
"Bashful",
"Dopey",
"Happy",
"Grumpy",
"Sleepy",
"Sneezy",
"Doc",
]
i = 0
while i < len(!!!dwarves!!!):
!!!name!!! = dwarves[i]
print(f"{name}s Room")
i += 1
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx-code-highlighter-0.0.4.tar.gz.
File metadata
- Download URL: sphinx-code-highlighter-0.0.4.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.1 Darwin/22.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
962ff19b669db45b0aef49e40caa01bf1f6f6850bf6029b3074db6b9c5d80aa7
|
|
| MD5 |
578f308555d3306319d2d5c7b67d6695
|
|
| BLAKE2b-256 |
2700eb550f4b7a29efe5d308fbe5b4f3b2f5c2c415c6c8954af95792a5d09a5b
|
File details
Details for the file sphinx_code_highlighter-0.0.4-py3-none-any.whl.
File metadata
- Download URL: sphinx_code_highlighter-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.1 Darwin/22.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00fb2976eb4097fe0547d667be326fdce82630ee2c042babdbe3cb38a81775f8
|
|
| MD5 |
f4913c1fc6ba16d3cf58fb4d61820a36
|
|
| BLAKE2b-256 |
a00a61e52a9c12792986ae3812178cfbab92fcb34d4137d4a7604b1cbd077149
|