starlight-links-validator 0.13.3 → 0.13.4

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 +3 -1
  2. package/package.json +1 -1
package/libs/remark.ts CHANGED
@@ -56,7 +56,9 @@ export const remarkStarlightLinksValidator: Plugin<[{ base: string; srcDir: URL
56
56
  break
57
57
  }
58
58
 
59
- fileHeadings.push(slugger.slug(content))
59
+ // Remove the last trailing hyphen from the slug like Astro does if it exists.
60
+ // https://github.com/withastro/astro/blob/74ee2e45ecc9edbe285eadee6d0b94fc47d0d125/packages/integrations/markdoc/src/heading-ids.ts#L21
61
+ fileHeadings.push(slugger.slug(content).replace(/-$/, ''))
60
62
 
61
63
  break
62
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-links-validator",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "license": "MIT",
5
5
  "description": "Starlight plugin to validate internal links.",
6
6
  "author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",