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

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 类型节点
@@ -51239,7 +51239,6 @@ const transformer_anyblock = () => {
51239
51239
  exports.ABConvertManager = ABConvertManager;
51240
51240
  exports.abConvertEvent = abConvertEvent;
51241
51241
  exports.jsdom_init = jsdom_init;
51242
- exports.remark_anyblock_render_codeblock = remark_anyblock_render_codeblock;
51243
51242
  exports.remark_anyblock_to_codeblock = remark_anyblock_to_codeblock;
51244
51243
  exports.transformer_anyblock = transformer_anyblock;
51245
51244
  //# sourceMappingURL=remark-any-block.cjs.map
@@ -51216,7 +51216,6 @@ export {
51216
51216
  ABConvertManager,
51217
51217
  abConvertEvent,
51218
51218
  jsdom_init,
51219
- remark_anyblock_render_codeblock,
51220
51219
  remark_anyblock_to_codeblock,
51221
51220
  transformer_anyblock
51222
51221
  };
package/index.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  // JsDom。仅用于提供document对象支持 (如果Ob环境中则不需要,用ob自带document对象的)
2
2
  export { jsdom_init } from './jsdom_init'
3
- export { transformer_anyblock, remark_anyblock_render_codeblock, remark_anyblock_to_codeblock } from './anyblock'
3
+ export {
4
+ transformer_anyblock,
5
+ // remark_anyblock_render_codeblock,
6
+ remark_anyblock_to_codeblock
7
+ } from './anyblock'
4
8
  export { abConvertEvent } from '../ABConverter/ABConvertEvent'
5
9
  export { ABConvertManager } from '../ABConverter/ABConvertManager' // for client
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyblock/remark-any-block",
3
- "version": "1.0.0-beta6",
3
+ "version": "1.0.0-beta7",
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",