sourcey 3.5.3 → 3.5.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.
|
@@ -4,9 +4,9 @@ export function normalizeDoxygenDescription(description, markdown) {
|
|
|
4
4
|
if (!description)
|
|
5
5
|
return "";
|
|
6
6
|
if (!description.includes("{#ref "))
|
|
7
|
-
return description;
|
|
7
|
+
return stripMarkdownLinks(description);
|
|
8
8
|
const firstParagraph = extractFirstParagraph(markdown);
|
|
9
|
-
return firstParagraph || description;
|
|
9
|
+
return stripMarkdownLinks(firstParagraph || description);
|
|
10
10
|
}
|
|
11
11
|
export function rewriteGeneratedDoxygenIncludePath(includePath) {
|
|
12
12
|
const normalized = includePath.replace(/\\/g, "/");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-assembly.d.ts","sourceRoot":"","sources":["../src/site-assembly.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAIlF,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAiB,QAAQ,EAAgB,MAAM,2BAA2B,CAAC;AACvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAA8B,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACvG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,cAAc,CAAC;IAC5B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACzC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,C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;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAKzE;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC9B,IAAI,EAAE,WAAW,EAAE,GAClB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAgBzB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC9B,QAAQ,EAAE,OAAO,EAAE,EACnB,IAAI,EAAE,WAAW,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN;AAaD,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,mBAAmB,EAAE,EAClC,eAAe,UAAQ,GACtB,IAAI,CAYN;AAED,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAIjF;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAI9E;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAEvF;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CA4BjF;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAUlD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAuEpF"}
|
package/dist/site-assembly.js
CHANGED
|
@@ -107,6 +107,7 @@ export async function assembleSite(config) {
|
|
|
107
107
|
if (config.changelog.permalinks) {
|
|
108
108
|
addPermalinkPages(pageMap, config.prettyUrls);
|
|
109
109
|
}
|
|
110
|
+
normalizeNavigationHrefs(siteTabs, config.prettyUrls);
|
|
110
111
|
const sitePages = Array.from(pageMap.values());
|
|
111
112
|
resolveInternalLinks(sitePages, config);
|
|
112
113
|
const extraFiles = attachChangelogFeeds(sitePages, config);
|
|
@@ -165,6 +166,16 @@ export function rebuildMarkdownTabNavigation(pageMap, siteTabs, tabs, tabSlug, p
|
|
|
165
166
|
if (idx !== -1)
|
|
166
167
|
siteTabs[idx] = navTab;
|
|
167
168
|
}
|
|
169
|
+
function normalizeNavigationHrefs(siteTabs, prettyUrls) {
|
|
170
|
+
for (const tab of siteTabs) {
|
|
171
|
+
tab.href = toPrettyLink(tab.href, prettyUrls);
|
|
172
|
+
for (const group of tab.groups) {
|
|
173
|
+
for (const item of group.items) {
|
|
174
|
+
item.href = toPrettyLink(item.href, prettyUrls);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
168
179
|
export function enforceChangelogDiagnostics(diagnostics, strictChangelog = false) {
|
|
169
180
|
const error = diagnostics.find((diagnostic) => diagnostic.severity === "error");
|
|
170
181
|
if (error) {
|
|
@@ -485,14 +496,14 @@ function resolveInternalHref(href, outputPath, docsSourcePath, pathMap, sourceBa
|
|
|
485
496
|
function toPrettyLink(target, prettyUrls) {
|
|
486
497
|
if (!prettyUrls)
|
|
487
498
|
return target;
|
|
488
|
-
if (prettyUrls === "strip" && target.endsWith(".html")) {
|
|
489
|
-
return target.slice(0, -(".html".length));
|
|
490
|
-
}
|
|
491
499
|
if (target === "index.html")
|
|
492
500
|
return "";
|
|
493
501
|
if (target.endsWith("/index.html")) {
|
|
494
502
|
const withSlash = target.slice(0, -"index.html".length);
|
|
495
503
|
return prettyUrls === "strip" ? withSlash.slice(0, -1) : withSlash;
|
|
496
504
|
}
|
|
505
|
+
if (prettyUrls === "strip" && target.endsWith(".html")) {
|
|
506
|
+
return target.slice(0, -(".html".length));
|
|
507
|
+
}
|
|
497
508
|
return target;
|
|
498
509
|
}
|