From 638f48c2fcd364f06d6a5ec5b2ae5ff39c86d8cd Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 23 Mar 2021 20:19:38 -0700 Subject: [PATCH] remove last script tag --- src/compiler/parse/state/setup.ts | 3 --- src/transform2.ts | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/compiler/parse/state/setup.ts b/src/compiler/parse/state/setup.ts index 45c251f514..b3c21b1062 100644 --- a/src/compiler/parse/state/setup.ts +++ b/src/compiler/parse/state/setup.ts @@ -8,11 +8,8 @@ export default function setup(parser: Parser): void { const content_start = parser.index; const setupScriptContent = parser.read_until(/^---/m); const content_end = parser.index; -console.log(setupScriptContent); parser.eat('---', true); const end = parser.index; - - console.log('XXX', parser.template.slice(end)); parser.js.push({ type: 'Script', context: 'setup', diff --git a/src/transform2.ts b/src/transform2.ts index 42a151b3c9..c58502f2fe 100644 --- a/src/transform2.ts +++ b/src/transform2.ts @@ -79,13 +79,14 @@ async function convertMdToJsx( // Break it up here so that the HTML parser won't detect it. const stringifiedSetupContext = JSON.stringify(setupContext).replace(/\<\/script\>/g, ``); - const raw = `
${mdHtml}
`; +--- +
${mdHtml}
`; const convertOptions = { compileOptions, filename, fileID };