Fixed empty lines when copying (9.5.18 regression)

This commit is contained in:
squidfunk 2024-05-12 13:59:08 +02:00
parent bd708f16bc
commit 937d7ccff1
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
4 changed files with 8 additions and 3 deletions

View File

@ -44,7 +44,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.66ac8b77.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.732c4fb1.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.06af60db.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.06af60db.min.css' | url }}">

View File

@ -222,6 +222,11 @@
// Copying in progress - this class is set before the content is copied and // Copying in progress - this class is set before the content is copied and
// removed after copying is done to mitigate whitespace-related issues. // removed after copying is done to mitigate whitespace-related issues.
code[data-md-copying] { code[data-md-copying] {
// Hack: since we're using grid layout when line spans are enabled, we need
// to set the display property to `initial` to prevent the grid layout from
// being applied to the code block when copying, because it will add empty
// lines to the copied content - see https://t.ly/wt4ye
display: initial;
// Temporarily remove highlighted lines - see https://bit.ly/32iVGWh // Temporarily remove highlighted lines - see https://bit.ly/32iVGWh
.hll { .hll {