@anyblock/remark-any-block 1.0.0-beta5 → 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/anyblock.ts +1 -1
- package/dist/remark-any-block.cjs +1 -1
- package/dist/remark-any-block.js +1 -1
- package/package.json +1 -1
package/anyblock.ts
CHANGED
|
@@ -188,7 +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 (
|
|
191
|
+
if (typeof document == "undefined") return
|
|
192
192
|
return (tree: Root, _file: VFile) => {
|
|
193
193
|
visit(tree, "code", (node: Code, index: number|undefined, parent: any|undefined) => { // 遍历所有的 code 类型节点
|
|
194
194
|
console.log("\nanyblock codeblock transformer visit:", node)
|
|
@@ -51185,7 +51185,7 @@ ${nodesToMarkdown(body)}`;
|
|
|
51185
51185
|
tree.children = out;
|
|
51186
51186
|
};
|
|
51187
51187
|
const remark_anyblock_render_codeblock = () => {
|
|
51188
|
-
if (
|
|
51188
|
+
if (typeof document == "undefined") return;
|
|
51189
51189
|
return (tree, _file) => {
|
|
51190
51190
|
visit$1(tree, "code", (node2, index2, parent2) => {
|
|
51191
51191
|
console.log("\nanyblock codeblock transformer visit:", node2);
|
package/dist/remark-any-block.js
CHANGED
|
@@ -51161,7 +51161,7 @@ ${nodesToMarkdown(body)}`;
|
|
|
51161
51161
|
tree.children = out;
|
|
51162
51162
|
};
|
|
51163
51163
|
const remark_anyblock_render_codeblock = () => {
|
|
51164
|
-
if (
|
|
51164
|
+
if (typeof document == "undefined") return;
|
|
51165
51165
|
return (tree, _file) => {
|
|
51166
51166
|
visit$1(tree, "code", (node2, index2, parent2) => {
|
|
51167
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-
|
|
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",
|