@t8/docsgen 0.1.76 → 0.1.77

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 CHANGED
@@ -630,7 +630,14 @@ function getTitle(ctx, { cover, originalContent, withPackageURL } = {}) {
630
630
 
631
631
  // src/bin/toFileContent.ts
632
632
  function toFileContent(x) {
633
- return `${x.replace(/\s+(\r?\n *<\/?(script|link|head|body|html|meta|title)[> ])/g, "$1").trim()}
633
+ let s = x.replace(
634
+ /\s+(\r?\n *<\/?(script|link|head|body|html|meta|title)[> ])/g,
635
+ "$1"
636
+ ).replace(
637
+ /\s+(\r?\n *<\/?(main|header|footer|nav|section|div|h\d|p|ul|ol|li|table)[> ])/g,
638
+ "$1"
639
+ ).trim();
640
+ return `${s}
634
641
  `;
635
642
  }
636
643
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/docsgen",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "description": "",
5
5
  "main": "dist/bin.js",
6
6
  "bin": {
@@ -1,3 +1,14 @@
1
1
  export function toFileContent(x: string) {
2
- return `${x.replace(/\s+(\r?\n *<\/?(script|link|head|body|html|meta|title)[> ])/g, "$1").trim()}\n`;
2
+ let s = x
3
+ .replace(
4
+ /\s+(\r?\n *<\/?(script|link|head|body|html|meta|title)[> ])/g,
5
+ "$1",
6
+ )
7
+ .replace(
8
+ /\s+(\r?\n *<\/?(main|header|footer|nav|section|div|h\d|p|ul|ol|li|table)[> ])/g,
9
+ "$1",
10
+ )
11
+ .trim();
12
+
13
+ return `${s}\n`;
3
14
  }