Skip to content

Commit

Permalink
fixed "disable copy" feature bug for newer Hugo version (localstack#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
webdev51 authored Sep 6, 2023
1 parent e17cdb7 commit 345a942
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ table tfoot {
}
.td-content, body{
.code-container {
position: relative;
.code-copy-button {
position: absolute;
top: 0;
Expand Down Expand Up @@ -565,4 +564,8 @@ table tfoot {
}
}

.disable-copy{
display: inline;
}

@import "modules/academy-styles.scss";
2 changes: 1 addition & 1 deletion layouts/shortcodes/command.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ $options = . }}
{{ end }}
{{ $highlighted := highlight $inner "text" $options }}
{{ $highlighted := replaceRE `###DISABLE_COPY###(?s)(.*?)###DISABLE_COPY_END###` "<span class=\"disable-copy\">$1</span>" $highlighted | safeHTML}}
{{ $highlighted := replaceRE `###DISABLE_COPY###(?s)(.*?)###DISABLE_COPY_END###` "<div class=\"disable-copy\">$1</div>" $highlighted | safeHTML}}
{{ with .Get "wrapper" }}
<div class="{{ . }}">
{{ end }}
Expand Down

0 comments on commit 345a942

Please sign in to comment.