Skip to content

Commit

Permalink
fix non-lazy playground-ide shortcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
e111077 committed Jul 20, 2024
1 parent e59a623 commit 6a15f47
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/lit-dev-tools-cjs/src/playground-plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,16 @@ export const playgroundPlugin = (
firstFilename
);
const previewHeight = config.previewHeight ?? '120px';
// in the case `lazy` is false, we need to keep the ">" character on the
// line right after the last attribute or else markdown will not render
// the closing tag correctly because it will be in a `<p>></p>`.
return `
<litdev-example ${sandboxUrl ? `sandbox-base-url='${sandboxUrl}'` : ''}
<litdev-example ${sandboxUrl ? `sandbox-base-url="${sandboxUrl}"` : ''}
style="--litdev-example-editor-lines-ts:${numVisibleLines.ts};
--litdev-example-editor-lines-js:${numVisibleLines.js};
--litdev-example-preview-height:${previewHeight}"
project=${project}
${lazy ? 'lazy' : ''}
>
--litdev-example-preview-height:${previewHeight};"
project="${project}"
${lazy ? 'lazy' : ''}>
</litdev-example>
`.trim();
}
Expand Down

0 comments on commit 6a15f47

Please sign in to comment.