koishi-plugin-fimtale-api 0.0.99 → 1.0.0

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/lib/index.js +6 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -78,7 +78,7 @@ function apply(ctx, config) {
78
78
  }, "generateGradient");
79
79
  const cleanContent = /* @__PURE__ */ __name((html) => {
80
80
  if (!html) return "";
81
- return html.replace(/style\s*=\s*['"][^'"]*['"]/gi, "").replace(/<p[^>]*>\s*(?:<br\s*\/?>|&nbsp;|&#160;|\s| )*\s*<\/p>/gi, "").replace(/<br\s*\/?>\s*<\/p>/gi, "</p>").replace(/<\/p>\s*(?:<br\s*\/?>\s*)+\s*<p/gi, "</p><p>").replace(/(?:<br\s*\/?>\s*){2,}/gi, "<br>").replace(/(?:<br\s*\/?>|&nbsp;|\s)+$/gi, "").trim();
81
+ return html.replace(/style\s*=\s*['"][^'"]*['"]/gi, "").replace(/<p[^>]*>\s*(?:<br\s*\/?>|&nbsp;|&#160;|\s| )*\s*<\/p>/gi, "").replace(/(<br\s*\/?>\s*){2,}/gi, "<br>").replace(/<\/p>\s*<br\s*\/?>\s*<p/gi, "</p><p>").replace(/<p[^>]*>\s*<br\s*\/?>/gi, "<p>").replace(/<br\s*\/?>\s*<\/p>/gi, "</p>").replace(/(?:<br\s*\/?>|&nbsp;|\s)+$/gi, "").trim();
82
82
  }, "cleanContent");
83
83
  const fontStack = '"Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif';
84
84
  const fontSerif = '"Noto Serif SC", "Source Han Serif SC", "SimSun", serif';
@@ -418,8 +418,11 @@ function apply(ctx, config) {
418
418
  transition: none;
419
419
  }
420
420
 
421
- /* 段落间距微调:更紧凑 */
422
- p { margin: 0 0 0.6em 0; text-indent: 2em; }
421
+ /* 段落间距优化:0.4em 是一个平衡点,紧凑但区分清晰 */
422
+ p {
423
+ margin: 0 0 0.4em 0;
424
+ text-indent: 2em;
425
+ }
423
426
  /* 防止最后一段下边距导致额外分页 */
424
427
  p:last-child { margin-bottom: 0; }
425
428
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-fimtale-api",
3
3
  "description": "Koishi插件,从fimtale搜索/订阅/随机获取小说/解析链接等",
4
- "version": "0.0.99",
4
+ "version": "1.0.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [