heading-case 2.0.0 → 2.0.1

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.
package/dist/core.js CHANGED
@@ -64,6 +64,7 @@ const dict = [
64
64
  'Svelte',
65
65
  'Server Action',
66
66
  'Service Worker',
67
+ 'Shiki',
67
68
  'TanStack Router',
68
69
  'TanStack Start',
69
70
  'Vite',
package/dist/index.js CHANGED
@@ -7,7 +7,9 @@ const collectWordNodes = (node, words)=>{
7
7
  };
8
8
  const formatHeading = (heading)=>{
9
9
  const wordNodes = [];
10
- collectWordNodes(heading, wordNodes);
10
+ const children = heading.children ?? [];
11
+ const contentNodes = children[0]?.type === 'linkReference' && 'shortcut' === children[0].referenceType ? children.slice(1) : children;
12
+ for (const child of contentNodes)collectWordNodes(child, wordNodes);
11
13
  const words = wordNodes.map((node)=>({
12
14
  type: 'whitespace' === node.type ? 'space' : 'word',
13
15
  value: node.value ?? ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heading-case",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/rstackjs/heading-case"