diff --git a/.changeset/short-mugs-smell.md b/.changeset/short-mugs-smell.md new file mode 100644 index 000000000..0ae1daa9f --- /dev/null +++ b/.changeset/short-mugs-smell.md @@ -0,0 +1,12 @@ +--- +'myst-to-react': patch +'myst-demo': patch +'@myst-theme/providers': patch +'@myst-theme/jupyter': patch +'@myst-theme/common': patch +'@myst-theme/article': patch +'@myst-theme/site': patch +'@myst-theme/book': patch +--- + +Updates to myst and bug fix for myst-demo (clone for html output). diff --git a/packages/myst-demo/src/index.tsx b/packages/myst-demo/src/index.tsx index 7ea73a8bf..d9899831a 100644 --- a/packages/myst-demo/src/index.tsx +++ b/packages/myst-demo/src/index.tsx @@ -105,8 +105,7 @@ async function parse( // Also run some of the transforms, like the links const mdastPre = JSON.parse(JSON.stringify(mdast)); visit(mdastPre, (n) => delete n.position); - unified().use(linksPlugin, { transformers: linkTransforms }).runSync(mdast); - const htmlString = mystToHtml(mdast); + const htmlString = mystToHtml(JSON.parse(JSON.stringify(mdast))); const references = { cite: { order: [], data: {} }, footnotes: {}, @@ -141,6 +140,7 @@ async function parse( .use(resolveReferencesPlugin, { state }) .use(keysPlugin) .runSync(mdast as any, file); + const mdastPost = JSON.parse(JSON.stringify(mdast)); visit(mdastPost, (n) => { delete n.position;