Skip to content

Commit

Permalink
fix: support CRLF for magic move (#1549)
Browse files Browse the repository at this point in the history
Co-authored-by: DChernov <DChernov@sportmasterlab.net>
  • Loading branch information
Sdju and DChernov committed Apr 17, 2024
1 parent 80a3ad6 commit 81e2a05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/slidev/node/syntax/transform/code-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { MarkdownTransformContext } from '@slidev/types'
import { normalizeRangeStr } from './utils'

export const reCodeBlock = /^```([\w'-]+?)(?:\s*{([\d\w*,\|-]+)}\s*?({.*?})?(.*?))?\n([\s\S]+?)^```$/mg
export const reCodeBlock = /^```([\w'-]+?)(?:\s*{([\d\w*,\|-]+)}\s*?({.*?})?(.*?))?\r?\n([\s\S]+?)^```$/mg

/**
* Transform code block with wrapper
Expand Down

0 comments on commit 81e2a05

Please sign in to comment.