MDsveX icon indicating copy to clipboard operation
MDsveX copied to clipboard

Frontmatter containing `$1` is correctly substituted

Open pensono opened this issue 9 months ago • 1 comments

Without this change, the script itself could be inserted into the metadata string.

Before,

---
price: '$10'
---
<script context="module">
</script>

becomes

<script·context="module">
export const metadata = {"price":"<script·context="module">0"};
const {·price·} = metadata;
</script>

The correct behavior is to keep the string as-is:

<script context="module">
export const metadata = {"price":"$10"};
const { price } = metadata;
</script>

pensono avatar May 01 '24 03:05 pensono

⚠️ No Changeset found

Latest commit: 9b71e220d3aac5c40ef1aa77dd275b164f51ba76

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar May 01 '24 03:05 changeset-bot[bot]

Sorry for the delay! Released now https://github.com/pngwn/MDsveX/releases/tag/mdsvex%400.11.1

pngwn avatar Jun 04 '24 12:06 pngwn