Skip to content

Commit

Permalink
trying to fix headings for Instapaper
Browse files Browse the repository at this point in the history
  • Loading branch information
stebunovd committed Jan 14, 2024
1 parent 2f4d842 commit 8400a59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/_markup/render-heading.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</h{{ .Level }}>
<h{{ .Level }} id="{{ .Anchor | safeURL }}"><span>{{ .Text | safeHTML }}</span></h{{ .Level }}>
2 changes: 1 addition & 1 deletion static/prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function activateAnchors() {
document.querySelectorAll('h2').forEach(function (h) {
var id = h.id;
if (id) {
h.innerHTML = '<a href="#' + id + '" class="anchor"><span>' + h.textContent + '</span></a>';
h.innerHTML = '<a href="#' + id + '" class="anchor">' + h.innerHTML + '</a>';
}
});
}
Expand Down

0 comments on commit 8400a59

Please sign in to comment.