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

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 CHANGED
@@ -1,9 +1,3 @@
1
- // import { unified } from 'unified';
2
- // import remarkParse from 'remark-parse';
3
- // import remarkRehype from 'remark-rehype';
4
- // import rehypeStringify from 'rehype-stringify';
5
-
6
- // import { remove } from "unist-util-remove"
7
1
  import { Plugin } from "unified"
8
2
  import { Root, RootContent, Paragraph, Text, Code, Html } from "mdast"
9
3
  import type { VFile } from "vfile"
@@ -187,7 +181,7 @@ export const remark_anyblock_to_codeblock: Plugin<[Partial<AnyBlockOptions>?], R
187
181
  }
188
182
 
189
183
  // 渲染 anyblock 代码块
190
- export const remark_anyblock_render_codeblock = () => {
184
+ const remark_anyblock_render_codeblock = () => {
191
185
  if (typeof document == "undefined") return
192
186
  return (tree: Root, _file: VFile) => {
193
187
  visit(tree, "code", (node: Code, index: number|undefined, parent: any|undefined) => { // 遍历所有的 code 类型节点