myst-to-jats
Version:
Export from MyST Markdown to JATS
25 lines (24 loc) • 1.14 kB
JavaScript
import { definitionTransform } from './definitions.js';
import { containerTransform } from './containers.js';
import { tableTransform } from './tables.js';
import { sectionTransform } from './sections.js';
import { blockTransform, restoreBlockPartTypeTransform } from './blocks.js';
import { citeGroupTransform } from './citations.js';
export { definitionTransform, definitionPlugin } from './definitions.js';
export { containerTransform, containerPlugin } from './containers.js';
export { tableTransform, tablePlugin } from './tables.js';
export { sectionTransform, sectionPlugin } from './sections.js';
export { blockTransform, blockPlugin } from './blocks.js';
export { referenceTargetTransform, referenceResolutionTransform } from './references.js';
export function basicTransformations(tree, opts) {
blockTransform(tree, opts);
definitionTransform(tree);
containerTransform(tree);
tableTransform(tree);
sectionTransform(tree, opts);
citeGroupTransform(tree);
restoreBlockPartTypeTransform(tree);
}
export const basicTransformationsPlugin = (opts) => (tree) => {
basicTransformations(tree, opts);
};