Skip to content

fix: incorrect code snippet regex match #2189

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

yuyinws
Copy link
Contributor

@yuyinws yuyinws commented May 29, 2025

resolve #2087

Description

When the code snippet syntax does not specify a specific language, the content below will be incorrectly matched, for example:

<<< @/file-a.js

```bash
# Testing
```

Before match result:

image

After this PR:

image

Copy link

netlify bot commented May 29, 2025

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 4c8d36e
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/6838183d17c3fe0008986fab
😎 Deploy Preview https://deploy-preview-2189--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

pkg-pr-new bot commented May 29, 2025

Open in StackBlitz

@slidev/client

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/client@2189

create-slidev

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev@2189

create-slidev-theme

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev-theme@2189

@slidev/parser

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/parser@2189

@slidev/cli

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/cli@2189

@slidev/types

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/types@2189

commit: 4c8d36e

@antfu antfu merged commit 73c969c into slidevjs:main May 29, 2025
20 checks passed
@kraenhansen
Copy link

Yay 🙌

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

Successfully merging this pull request may close these issues.

Import code snippet with no explicit language breaks subsequent content
3 participants