Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontmatter containing $1 is correctly substituted #600

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

pensono
Copy link
Contributor

@pensono pensono commented May 1, 2024

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"};
constprice·} = metadata;
</script>

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

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

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

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

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

changeset-bot bot commented May 1, 2024

⚠️ No Changeset found

Latest commit: 9b71e22

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

@pngwn pngwn merged commit a6fc18e into pngwn:master Jun 4, 2024
7 checks passed
@pngwn
Copy link
Owner

pngwn commented Jun 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants