@xingwangzhe/stalux 1.25.6 → 1.25.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingwangzhe/stalux",
3
- "version": "1.25.6",
3
+ "version": "1.25.7",
4
4
  "description": "A powerful, modern Astro blog theme — use as template or install as plugin",
5
5
  "keywords": [
6
6
  "astro",
@@ -78,6 +78,7 @@
78
78
  "@astrojs/markdown-satteri": "0.3.7",
79
79
  "@astrojs/rss": "^4.0.19",
80
80
  "@astrojs/sitemap": "^3.7.3",
81
+ "@echogarden/icu-segmentation-wasm": "^0.4.0",
81
82
  "@echogarden/text-segmentation": "^0.7.0",
82
83
  "@expressive-code/plugin-line-numbers": "^0.44.1",
83
84
  "@lucide/astro": "^1.33.0",
@@ -6,7 +6,7 @@ import jsTokens from "js-tokens";
6
6
  * 只从 Sätteri 的 MDAST/HAST 节点读取信息,并通过 ctx 注入最终结果。
7
7
  *
8
8
  * 字数统计策略:
9
- * - 只数 heading 和 paragraph 的内容(用 ctx.textContent 获取纯文本)。
9
+ * - 从 root 递归收集正文文本,覆盖列表、引用、表格等嵌套块。
10
10
  * - 独立的 code 块、math/displayMath 公式不参与计数
11
11
  * (代码是"看"不是"读",符号表达式不按词计)。
12
12
  * - 行内 code 和行内 math 会被 textContent(paragraph) 自然包含。
@@ -92,6 +92,11 @@ export const featureFlagsMdast = defineMdastPlugin({
92
92
  getState(ctx).proseText += ` ${ctx.textContent(node)}`;
93
93
  injectState(ctx);
94
94
  },
95
+
96
+ tableCell(node, ctx) {
97
+ getState(ctx).proseText += ` ${ctx.textContent(node)}`;
98
+ injectState(ctx);
99
+ },
95
100
  });
96
101
 
97
102
  /**