(
plugins: Array<
ITransformPlugin | (() => ITransformPlugin)
> = builtInPlugins,
)
| 44 | plugins: ITransformPlugin[]; |
| 45 | |
| 46 | constructor( |
| 47 | plugins: Array< |
| 48 | ITransformPlugin | (() => ITransformPlugin) |
| 49 | > = builtInPlugins, |
| 50 | ) { |
| 51 | this.hooks = createTransformHooks(this); |
| 52 | this.plugins = plugins.map((plugin) => |
| 53 | typeof plugin === 'function' ? plugin() : plugin, |
| 54 | ); |
| 55 | |
| 56 | const assetsMap: typeof this.assetsMap = {}; |
| 57 | for (const { name, transform } of this.plugins) { |
| 58 | assetsMap[name] = transform(this.hooks); |
| 59 | } |
| 60 | this.assetsMap = assetsMap; |
| 61 | |
| 62 | const md = initializeMarkdownIt(); |
| 63 | this.md = md; |
| 64 | this.hooks.parser.call(md); |
| 65 | } |
| 66 | |
| 67 | transform( |
| 68 | content: string, |
nothing calls this directly
no test coverage detected