Skip to content

Commit

Permalink
fix: Add data-no-index attribute to anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Aug 23, 2024
1 parent ff69ebb commit b9be4a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transform/plugins/anchors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const index: MarkdownItPluginCb<Options> = (md, options) => {
}

md.renderer.rules.anchor_hidden_desc = function (tokens, index) {
return '<span class="visually-hidden">' + escapeHtml(tokens[index].content) + '</span>';
return '<span class="visually-hidden" data-no-index="true">' + escapeHtml(tokens[index].content) + '</span>';

Check failure on line 174 in src/transform/plugins/anchors/index.ts

View workflow job for this annotation

GitHub Actions / Verify Files

Replace `'<span·class="visually-hidden"·data-no-index="true">'·+·escapeHtml(tokens[index].content)·+·'</span>'` with `(⏎············'<span·class="visually-hidden"·data-no-index="true">'·+⏎············escapeHtml(tokens[index].content)·+⏎············'</span>'⏎········)`
};
};

Expand Down

0 comments on commit b9be4a2

Please sign in to comment.