本文整理匯總了TypeScript中@argdown/node.argdown.addPlugin方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript argdown.addPlugin方法的具體用法?TypeScript argdown.addPlugin怎麽用?TypeScript argdown.addPlugin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@argdown/node.argdown
的用法示例。
在下文中一共展示了argdown.addPlugin方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: constructor
import * as path from "path";
import { ArgdownPreviewConfiguration } from "./ArgdownPreviewConfiguration";
import { findElementAtPositionPlugin } from "./FindElementAtPositionPlugin";
import { argdown } from "@argdown/node";
import {
IArgdownRequest,
ISection,
IEquivalenceClass,
IArgument,
IMapNode,
isGroupMapNode,
ArgdownTypes,
IMap,
stringifyArgdownData
} from "@argdown/core";
argdown.addPlugin(findElementAtPositionPlugin, "find-element-at-position");
export class ArgdownEngine {
public constructor() {}
public async exportHtml(
doc: vscode.TextDocument,
config: ArgdownPreviewConfiguration
): Promise<string> {
const argdownConfig = config.argdownConfig || {};
const input = doc.getText();
const request: IArgdownRequest = {
...argdownConfig,
input: input,
process: ["parse-input", "build-model", "export-html"],
html: {
...argdownConfig.html,