starlight-links-validator 0.9.1 → 0.10.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.
Files changed (2) hide show
  1. package/libs/remark.ts +5 -0
  2. package/package.json +2 -1
package/libs/remark.ts CHANGED
@@ -39,6 +39,11 @@ export const remarkStarlightLinksValidator: Plugin<[base: string], Root> = funct
39
39
  // https://github.com/syntax-tree/mdast-util-mdx-jsx#nodes
40
40
  switch (node.type) {
41
41
  case 'heading': {
42
+ if (node.data?.hProperties?.['id']) {
43
+ fileHeadings.push(String(node.data.hProperties['id']))
44
+ break
45
+ }
46
+
42
47
  const content = toString(node)
43
48
 
44
49
  if (content.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-links-validator",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "license": "MIT",
5
5
  "description": "Starlight plugin to validate internal links.",
6
6
  "author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",
@@ -27,6 +27,7 @@
27
27
  "@types/picomatch": "2.3.3",
28
28
  "astro": "4.0.4",
29
29
  "mdast-util-mdx-jsx": "3.0.0",
30
+ "remark-custom-heading-id": "2.0.0",
30
31
  "typescript": "5.1.3",
31
32
  "unified": "11.0.4",
32
33
  "vfile": "6.0.1",