@anyblock/remark-any-block 1.0.0-beta3 → 1.0.0-beta4
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 +2 -2
- package/dist/remark-any-block.cjs +2587 -1018
- package/dist/remark-any-block.js +2587 -1018
- package/index.ts +1 -1
- package/package.json +1 -1
package/anyblock.ts
CHANGED
|
@@ -187,7 +187,7 @@ export const remark_anyblock_to_codeblock: Plugin<[Partial<AnyBlockOptions>?], R
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// 渲染 anyblock 代码块
|
|
190
|
-
const remark_anyblock_render_codeblock = () => {
|
|
190
|
+
export const remark_anyblock_render_codeblock = () => {
|
|
191
191
|
return (tree: Root, _file: VFile) => {
|
|
192
192
|
visit(tree, "code", (node: Code, index: number|undefined, parent: any|undefined) => { // 遍历所有的 code 类型节点
|
|
193
193
|
console.log("\nanyblock codeblock transformer visit:", node)
|
|
@@ -222,7 +222,7 @@ const remark_anyblock_render_codeblock = () => {
|
|
|
222
222
|
|
|
223
223
|
{
|
|
224
224
|
// 定义环境条件
|
|
225
|
-
ABCSetting.env = "
|
|
225
|
+
ABCSetting.env = "remark";
|
|
226
226
|
|
|
227
227
|
// 定义默认渲染行为 // [!code hl] risk 同步适配异步,可能会存在问题
|
|
228
228
|
ABConvertManager.getInstance().redefine_renderMarkdown((markdown: string, el: HTMLElement):void => {
|