Skip to content

fix: incorrect code snippet regex match#2189

Merged
antfu merged 1 commit into
slidevjs:mainfrom
yuyinws:fix/code-snippet
May 29, 2025
Merged

fix: incorrect code snippet regex match#2189
antfu merged 1 commit into
slidevjs:mainfrom
yuyinws:fix/code-snippet

Conversation

@yuyinws

@yuyinws yuyinws commented May 29, 2025

Copy link
Copy Markdown
Contributor

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

@netlify

netlify Bot commented May 29, 2025

Copy link
Copy Markdown

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.

@pkg-pr-new

pkg-pr-new Bot commented May 29, 2025

Copy link
Copy Markdown

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
@kraenhansen

Copy link
Copy Markdown

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