Skip to content

Commit 6f9cb09

Browse files
committed
Wrap lines table format as well and adjust docs theme line highlight
1 parent 97f7166 commit 6f9cb09

File tree

7 files changed

+15
-8
lines changed

7 files changed

+15
-8
lines changed

docs/src/markdown/about/changelog.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ icon: lucide/scroll-text
1111

1212
In addition, Quotes also provides an optional feature to enable specifying callouts/alerts in the style used by
1313
GitHub and Obsidian.
14-
- **NEW**: Highlight: When using Pygments and not using the table format for line numbers, lines are now wrapped in
15-
`<span>` tags. This allows for easier and better styling of line highlights. Using `line_spans` will additionally
16-
add IDs as they always did.
14+
- **NEW**: Highlight: When using Pygments lines are now wrapped in `<span>` tags. This allows for easier and better
15+
styling of line highlights. Using `line_spans` will additionally add IDs as they always did.
1716

1817
## 10.19.1
1918

docs/src/scss/extensions/_highlight.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
}
99

1010
.highlight {
11+
.hll {
12+
box-shadow: 2px 0 0 0 var(--md-accent-fg-color) inset;
13+
}
14+
1115
.kc { // Keyword constant
1216
color: var(--md-code-hl-constant-color);
1317
}
@@ -76,6 +80,10 @@
7680
background-color: var(--md-code-special-bg-color);
7781
}
7882
}
83+
84+
.hll [data-linenos]::before {
85+
box-shadow: -2px 0 var(--md-accent-fg-color) inset;
86+
}
7987
}
8088

8189
/* Special line number coloring for tables */

docs/theme/assets/pymdownx-extras/extra-54d451ef87.css renamed to docs/theme/assets/pymdownx-extras/extra-340de9f8e9.css

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

docs/theme/assets/pymdownx-extras/extra-340de9f8e9.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/theme/assets/pymdownx-extras/extra-54d451ef87.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

pymdownx/highlight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def format_unencoded(self, tokensource, outfile):
268268
source = self._wrap_lineanchors(source)
269269
if self.linespans:
270270
source = self._wrap_linespans(source)
271-
elif self.linenos in (0, 2):
271+
else:
272272
source = self._wrap_lines(source)
273273
source = self.wrap(source)
274274
if self.linenos == 1:

zensical.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ extra:
268268

269269
extra_css:
270270
# - https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css
271-
- assets/pymdownx-extras/extra-54d451ef87.css
271+
- assets/pymdownx-extras/extra-340de9f8e9.css
272272
extra_javascript:
273273
- assets/pymdownx-extras/extra-loader-Ccztcqfq.js
274274
- https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js

0 commit comments

Comments
 (0)