@t8/docsgen 0.2.35 → 0.2.37
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/bin.js +2 -2
- package/package.json +1 -1
- package/src/bin/setContent.ts +1 -1
- package/src/bin/stripHTML.ts +1 -2
package/dist/bin.js
CHANGED
|
@@ -144,7 +144,7 @@ function stripHTML(content, replaceNbsp = false) {
|
|
|
144
144
|
let t = content.replaceAll("<sup>", " (").replaceAll("</sup>", ")");
|
|
145
145
|
let s = new import_jsdom.JSDOM(t).window.document.body.textContent;
|
|
146
146
|
if (replaceNbsp) s = s.replaceAll("\xA0", " ");
|
|
147
|
-
s = s.replace(/
|
|
147
|
+
s = s.replace(/ +/g, " ");
|
|
148
148
|
return s;
|
|
149
149
|
} catch {
|
|
150
150
|
}
|
|
@@ -880,7 +880,7 @@ ${intro || features || note ? `
|
|
|
880
880
|
${features ? `<div class="features">${features}</div>` : ""}
|
|
881
881
|
${note ? `<div class="note">${note}</div>` : ""}
|
|
882
882
|
<p class="pagenav">
|
|
883
|
-
<span class="next"><a href="
|
|
883
|
+
<span class="next"><a href="${root}start">To the docs</a> <span class="icon">\u2192</span></span>
|
|
884
884
|
</p>
|
|
885
885
|
</div>
|
|
886
886
|
</section>
|
package/package.json
CHANGED
package/src/bin/setContent.ts
CHANGED
|
@@ -251,7 +251,7 @@ ${
|
|
|
251
251
|
${features ? `<div class="features">${features}</div>` : ""}
|
|
252
252
|
${note ? `<div class="note">${note}</div>` : ""}
|
|
253
253
|
<p class="pagenav">
|
|
254
|
-
<span class="next"><a href="
|
|
254
|
+
<span class="next"><a href="${root}start">To the docs</a> <span class="icon">→</span></span>
|
|
255
255
|
</p>
|
|
256
256
|
</div>
|
|
257
257
|
</section>
|
package/src/bin/stripHTML.ts
CHANGED
|
@@ -3,11 +3,10 @@ import { JSDOM } from "jsdom";
|
|
|
3
3
|
export function stripHTML(content: string, replaceNbsp = false) {
|
|
4
4
|
try {
|
|
5
5
|
let t = content.replaceAll("<sup>", " (").replaceAll("</sup>", ")");
|
|
6
|
-
|
|
7
6
|
let s = new JSDOM(t).window.document.body.textContent;
|
|
8
7
|
|
|
9
8
|
if (replaceNbsp) s = s.replaceAll("\xa0", " ");
|
|
10
|
-
s = s.replace(/
|
|
9
|
+
s = s.replace(/ +/g, " ");
|
|
11
10
|
|
|
12
11
|
return s;
|
|
13
12
|
} catch {}
|