@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 +1 -1
- package/anyblock.ts +1 -0
- package/dist/remark-any-block.cjs +1 -0
- package/dist/remark-any-block.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
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);
|
package/dist/remark-any-block.js
CHANGED
|
@@ -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-
|
|
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",
|