@shelf/table-of-contents 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,7 +18,7 @@ export const getDataWithoutNestedAnchors = (data, headerTemplate) => {
|
|
|
18
18
|
const otherAnchorElements = doc?.querySelectorAll(`a:not([href="#${data.anchor}"]):empty`);
|
|
19
19
|
if (otherAnchorElements && otherAnchorElements?.length > 0) {
|
|
20
20
|
otherAnchorElements.forEach(node => {
|
|
21
|
-
|
|
21
|
+
node.remove();
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
// get all content nodes from Toc pointer anchor node
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelf/table-of-contents",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Fork of node-toc to reduce bundle size & rewritten in TypeScript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -46,22 +46,22 @@
|
|
|
46
46
|
"@shelf/eslint-config": "3.10.0",
|
|
47
47
|
"@shelf/prettier-config": "1.0.0",
|
|
48
48
|
"@shelf/tsconfig": "0.0.11",
|
|
49
|
-
"@size-limit/esbuild-why": "
|
|
50
|
-
"@size-limit/preset-small-lib": "
|
|
51
|
-
"@swc/core": "1.3.
|
|
49
|
+
"@size-limit/esbuild-why": "11.0.0",
|
|
50
|
+
"@size-limit/preset-small-lib": "11.0.0",
|
|
51
|
+
"@swc/core": "1.3.96",
|
|
52
52
|
"@swc/jest": "0.2.29",
|
|
53
|
-
"@types/jest": "29.5.
|
|
54
|
-
"@types/lodash.defaults": "4.2.
|
|
55
|
-
"@types/lodash.template": "4.5.
|
|
53
|
+
"@types/jest": "29.5.8",
|
|
54
|
+
"@types/lodash.defaults": "4.2.9",
|
|
55
|
+
"@types/lodash.template": "4.5.3",
|
|
56
56
|
"@types/node": "20.8.9",
|
|
57
|
-
"@types/slug": "5.0.
|
|
57
|
+
"@types/slug": "5.0.7",
|
|
58
58
|
"eslint": "8.52.0",
|
|
59
59
|
"husky": "8.0.3",
|
|
60
60
|
"jest": "29.7.0",
|
|
61
61
|
"jest-environment-jsdom": "^29.7.0",
|
|
62
62
|
"lint-staged": "15.0.2",
|
|
63
63
|
"prettier": "3.0.3",
|
|
64
|
-
"size-limit": "
|
|
64
|
+
"size-limit": "11.0.0",
|
|
65
65
|
"ts-jest-resolver": "2.0.1",
|
|
66
66
|
"typescript": "5.2.2"
|
|
67
67
|
},
|