Skip to content

Commit 687466d

Browse files
committed
Fixed copy-to-clipboard adding blank lines when using line anchors (8.1.0 regression)
1 parent d7155fc commit 687466d

File tree

7 files changed

+9
-6
lines changed

7 files changed

+9
-6
lines changed

material/assets/stylesheets/main.840a26e4.min.css

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

material/assets/stylesheets/main.840a26e4.min.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.

material/assets/stylesheets/main.fc338f16.min.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

material/assets/stylesheets/main.fc338f16.min.css.map

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

material/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{% endif %}
3535
{% endblock %}
3636
{% block styles %}
37-
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.fc338f16.min.css' | url }}">
37+
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.840a26e4.min.css' | url }}">
3838
{% if config.theme.palette %}
3939
{% set palette = config.theme.palette %}
4040
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.dc90facb.min.css' | url }}">

src/assets/stylesheets/main/extensions/pymdownx/_highlight.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,12 @@
204204
// Code block line anchors - Chrome and Safari seem to have a strange bug
205205
// where scroll margin is not applied to anchors inside code blocks. Setting
206206
// positioning to absolute seems to fix the problem. Interestingly, this does
207-
// not happen in Firefox.
207+
// not happen in Firefox. Furthermore we must set `visibility: hidden` or
208+
// the copy to clipboard functionality will include an empty line between
209+
// each set of lines.
208210
code a[id] {
209211
position: absolute;
212+
visibility: hidden;
210213
}
211214
}
212215

src/assets/stylesheets/main/layout/_clipboard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
}
6464

6565
// Button on focus/hover
66-
&:where(:focus, :hover) {
66+
&:is(:focus, :hover) {
6767
color: var(--md-accent-fg-color);
6868
}
6969

0 commit comments

Comments
 (0)