@anyblock/remark-any-block 1.0.0-beta4 → 1.0.0-beta6

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/README.md CHANGED
@@ -30,7 +30,7 @@ $ npm publish --tag beta # 如果使用测试或beta版本 (包含 `-tagname`)
30
30
  ```
31
31
 
32
32
  > [!warning]
33
- > 补丁: 2025-12-09 开始不再能使用长期验证方式,得用 `npm login`
33
+ > 补丁: 2025-12-09 开始不再能使用长期验证方式,得每次都要 `npm login` 一下
34
34
  >
35
35
  > 否则报错:
36
36
  > ```bash
package/anyblock.ts CHANGED
@@ -188,6 +188,7 @@ export const remark_anyblock_to_codeblock: Plugin<[Partial<AnyBlockOptions>?], R
188
188
 
189
189
  // 渲染 anyblock 代码块
190
190
  export const remark_anyblock_render_codeblock = () => {
191
+ if (typeof document == "undefined") return
191
192
  return (tree: Root, _file: VFile) => {
192
193
  visit(tree, "code", (node: Code, index: number|undefined, parent: any|undefined) => { // 遍历所有的 code 类型节点
193
194
  console.log("\nanyblock codeblock transformer visit:", node)
@@ -51185,6 +51185,7 @@ ${nodesToMarkdown(body)}`;
51185
51185
  tree.children = out;
51186
51186
  };
51187
51187
  const remark_anyblock_render_codeblock = () => {
51188
+ if (typeof document == "undefined") return;
51188
51189
  return (tree, _file) => {
51189
51190
  visit$1(tree, "code", (node2, index2, parent2) => {
51190
51191
  console.log("\nanyblock codeblock transformer visit:", node2);
@@ -51161,6 +51161,7 @@ ${nodesToMarkdown(body)}`;
51161
51161
  tree.children = out;
51162
51162
  };
51163
51163
  const remark_anyblock_render_codeblock = () => {
51164
+ if (typeof document == "undefined") return;
51164
51165
  return (tree, _file) => {
51165
51166
  visit$1(tree, "code", (node2, index2, parent2) => {
51166
51167
  console.log("\nanyblock codeblock transformer visit:", node2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyblock/remark-any-block",
3
- "version": "1.0.0-beta4",
3
+ "version": "1.0.0-beta6",
4
4
  "description": "You can flexibility to create a 'Block' by many means. It also provides many useful features, like `list to table`.",
5
5
  "types": "@types/index_remark.d.ts",
6
6
  "type": "module",