Skip to content

Commit

Permalink
fix w3c/w3c-website#469 (comment) markup heading anchors remove marku…
Browse files Browse the repository at this point in the history
…p from heading
  • Loading branch information
jean-gui committed Oct 16, 2024
1 parent 55bd03a commit 9f42b07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions assets-src/js/main/heading-anchors.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ let headingAnchors = function () {
anchor.innerHTML = '<span aria-hidden="true">&sect;</span>'
+'<span class="visuallyhidden">'
+ translate.translate('anchor', languageCode) + '</span>';
heading.textContent += '\xa0';
heading.append('\xa0');
heading.appendChild(anchor);

});
Expand All @@ -88,4 +88,4 @@ let headingAnchors = function () {

}

export {headingAnchors};
export {headingAnchors};
3 changes: 2 additions & 1 deletion public/dist/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,8 @@ let headingAnchors = function () {
anchor.setAttribute('href', '#' + anchorHref);
anchor.setAttribute('class', 'heading-anchor');
anchor.innerHTML = '<span aria-hidden="true">&sect;</span>' + '<span class="visuallyhidden">' + _translations__WEBPACK_IMPORTED_MODULE_0__.translate.translate('anchor', languageCode) + '</span>';
heading.textContent += '\xa0';
console.log(heading.textContent);
heading.append('\xa0');
heading.appendChild(anchor);
});
}
Expand Down
Loading

0 comments on commit 9f42b07

Please sign in to comment.