From 4a542e44491a0342a5f6362f213cdf0396428906 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Fri, 2 Oct 2026 16:33:55 -0400 Subject: [PATCH] fix: asciidoc sectnums + twemoji version mismatch --- frontend/package-lock.json | 16 +++++++++++----- frontend/package.json | 2 +- frontend/src/renderers/asciidoc.js | 12 ++++++++++-- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f0dc3f490..121459f37 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -12,7 +12,7 @@ "@excalidraw/excalidraw": "0.18.1", "@simplewebauthn/browser": "14.0.0", "@tailwindcss/vite": "4.3.3", - "@twemoji/api": "17.0.3", + "@twemoji/api": "17.0.2", "@xterm/addon-fit": "0.11.0", "@xterm/xterm": "6.0.0", "@zip.js/zip.js": "2.22.0", @@ -3484,17 +3484,23 @@ } }, "node_modules/@twemoji/api": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@twemoji/api/-/api-17.0.3.tgz", - "integrity": "sha512-iwERjxY0QgPGVwT6b1OKG0Oa9nIfHhJw+Ij1TapTBMKTvVCU6qdXPXX/XKwxKx5QZIJW5GwELUCtw8wlaIQ2ug==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/@twemoji/api/-/api-17.0.2.tgz", + "integrity": "sha512-5xIdBcFLpRW4goXNdNNz497TzMHF2a76yElEaqISxVPj+KpJB82KuXHczfjhhTCsPaP1lAhM3qPtvAhMG7e71A==", "license": "MIT AND CC-BY-4.0", "dependencies": { - "@twemoji/parser": "17.0.2", + "@twemoji/parser": "17.0.1", "fs-extra": "^8.0.1", "jsonfile": "^5.0.0", "universalify": "^0.1.2" } }, + "node_modules/@twemoji/api/node_modules/@twemoji/parser": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@twemoji/parser/-/parser-17.0.1.tgz", + "integrity": "sha512-Uiq5sq1Wx91Y6C0DczMlu4Gj4nC/0z8UIhT7S53hi/JATaS1oLM5jXygjot7STtyVoIagfnpsBCWaNy3ayfyFw==", + "license": "MIT" + }, "node_modules/@twemoji/parser": { "version": "17.0.2", "license": "MIT" diff --git a/frontend/package.json b/frontend/package.json index 343cffeee..e4ea640e2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -21,7 +21,7 @@ "@excalidraw/excalidraw": "0.18.1", "@simplewebauthn/browser": "14.0.0", "@tailwindcss/vite": "4.3.3", - "@twemoji/api": "17.0.3", + "@twemoji/api": "17.0.2", "@xterm/addon-fit": "0.11.0", "@xterm/xterm": "6.0.0", "@zip.js/zip.js": "2.22.0", diff --git a/frontend/src/renderers/asciidoc.js b/frontend/src/renderers/asciidoc.js index d5fc6cc54..179c3087f 100644 --- a/frontend/src/renderers/asciidoc.js +++ b/frontend/src/renderers/asciidoc.js @@ -110,10 +110,18 @@ const LOCKED_ATTRIBUTES = { * Attributes a page MAY set, with what it gets when it does not. * * Trailing `@`, so a document that sets one wins. These only change how a page reads. + * + * To default one to UNSET without locking it, the value is `false` and never `null`: Asciidoctor + * reads `null` as a hard unset that no attribute entry in the document can undo, which is + * `LOCKED_ATTRIBUTES`' notation and not this table's. */ const DEFAULT_ATTRIBUTES = { - // -> Off, as markdown has no section numbering either - sectnums: null, + /* + Off, as markdown has no section numbering either -- but a page that writes `:sectnums:` gets it. + The number is part of the heading's text, so the sidebar's contents (`anchorHeadings`) carries it + too, while the heading's id is derived from the title alone and stays the same either way. + */ + sectnums: false, idprefix: '@', idseparator: '-@', tabsize: '2@'