Skip to content

Commit

Permalink
fix issue #19
Browse files Browse the repository at this point in the history
  • Loading branch information
jgsrty committed Jan 13, 2023
1 parent 6518db5 commit 783e185
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ export function replaceUrl(mark: string, placeholder: string, code: string) {
}
let rusultCode = ''
let quote = Array.from(codeSpinner[0].matchAll(/'/g) || []).length % 2 === 1 ? "'" : '"'
for(let i = 0; i < codeSpinner.length-1; i++) {
for(let i = 0; i < codeSpinner.length; i++) {
const codeItem = codeSpinner[i]
const codeItemNext = codeSpinner[i+1]
rusultCode += codeItem + `url(${quote}+${placeholder}+${quote}/` + codeItemNext
if(i === codeSpinner.length - 1) {
rusultCode += codeItem
}else {
rusultCode += codeItem + `url(${quote}+${placeholder}+${quote}/`
}
}
return rusultCode
}
Expand Down

0 comments on commit 783e185

Please sign in to comment.