Skip to content

Commit

Permalink
Fix exportVideo
Browse files Browse the repository at this point in the history
  • Loading branch information
baku89 committed Feb 18, 2024
1 parent 205725a commit fce8ff3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/components/exportVideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function exportVideo(code: string) {
const frames: string[] = []

for (let i = 0; i < 100; i++) {
const time = i / (100 - 1)
const time = i / 100

evalFn(time)

Expand All @@ -50,7 +50,7 @@ export async function exportVideo(code: string) {

const codeImg = await renderCode(
code.replace(
/([^a-zA-Z0-9])time([^a-zA-Z0-9]?)/g,
/([^a-zA-Z0-9{])time([^a-zA-Z0-9]?)/g,
`$1${time.toFixed(2)}$2`
)
)
Expand Down

0 comments on commit fce8ff3

Please sign in to comment.