@serene-pub/docs 0.6.0-pr-4 → 0.6.0-pr-5

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/dist/compile.js +9 -0
  2. package/package.json +3 -3
package/dist/compile.js CHANGED
@@ -126,6 +126,15 @@ export async function compileDocs(opts) {
126
126
  offenders.push(`\`${page.slug}\` links \`${link.href}\` — slug \`${link.slug}\` is not in any source.`);
127
127
  continue;
128
128
  }
129
+ // TypeDoc's markdown numbers an anchor it believes is duplicated
130
+ // (`#strokekind-1` on a page whose only such heading is
131
+ // `#strokekind`). On an API page, a numbered anchor whose base
132
+ // heading exists lands on that heading rather than failing the build.
133
+ if (link.anchor &&
134
+ !target.has(link.anchor) &&
135
+ link.slug.includes('/api/') &&
136
+ target.has(link.anchor.replace(/-\d+$/, '')))
137
+ continue;
129
138
  if (link.anchor && !target.has(link.anchor)) {
130
139
  offenders.push(`\`${page.slug}\` links \`${link.href}\` — page \`${link.slug}\` has no ` +
131
140
  `heading id \`${link.anchor}\`.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serene-pub/docs",
3
- "version": "0.6.0-pr-4",
3
+ "version": "0.6.0-pr-5",
4
4
  "description": "Serene Pub's docs compiler: markdown sources plus rendered announcement pages in, a manifest, a search index and one HTML file per page out.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/SerenePub/serene-pub-sdk/tree/main/docs#readme",
@@ -51,7 +51,7 @@
51
51
  "shiki": "^4.4.3"
52
52
  },
53
53
  "peerDependencies": {
54
- "@serene-pub/sdk": "^0.6.0-pr-4"
54
+ "@serene-pub/sdk": "^0.6.0-pr-5"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "@serene-pub/sdk": {
@@ -59,7 +59,7 @@
59
59
  }
60
60
  },
61
61
  "devDependencies": {
62
- "@serene-pub/sdk": "0.6.0-pr-4"
62
+ "@serene-pub/sdk": "0.6.0-pr-5"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public",