Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Releases before 1.1.0 predate this file.

## [1.2.12] - 2026-10-05

### Fixed

- Heading anchors strip nested markup completely.

## [1.2.11] - 2026-10-04

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "terms",
"version": "1.2.11",
"version": "1.2.12",
"description": "Cuesoft Terms of Service: markdown source, built into the brand template.",
"private": true,
"type": "module",
Expand Down
9 changes: 6 additions & 3 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,12 @@ marked.use({
renderer: {
heading({ tokens, depth }) {
const text = this.parser.parseInline(tokens);
const id = text
.toLowerCase()
.replace(/<[^>]+>/g, '')
let plain = text.toLowerCase();
for (let last; plain !== last;) {
last = plain;
plain = plain.replace(/<[^>]+>/g, '');
}
const id = plain
.replace(/[^a-z0-9 -]/g, '')
.trim()
.replace(/\s+/g, '-');
Expand Down
Loading