Skip to content

Commit 0a5ce35

Browse files
committed
feat: add quotes for inline properties
1 parent db04bfe commit 0a5ce35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/toRedactor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,13 @@ export const toRedactor = (jsonValue: any,options?:IJsonToHtmlOptions) : string
222222
}
223223
if(jsonValue['classname'] || jsonValue['id']){
224224
if(jsonValue['classname'] && jsonValue['id']){
225-
text = `<span class=${jsonValue['classname']} id=${jsonValue['id']}>${text}</span>`
225+
text = `<span class="${jsonValue['classname']}" id="${jsonValue['id']}">${text}</span>`
226226
}
227227
else if(jsonValue['classname'] && !jsonValue['id']){
228-
text = `<span class=${jsonValue['classname']}>${text}</span>`
228+
text = `<span class="${jsonValue['classname']}">${text}</span>`
229229
}
230230
else if(jsonValue['id'] && !jsonValue['classname']){
231-
text = `<span id=${jsonValue['id']}>${text}</span>`
231+
text = `<span id="${jsonValue['id']}">${text}</span>`
232232
}
233233
}
234234
if (jsonValue.text.includes('\n') && !jsonValue['break']) {

0 commit comments

Comments
 (0)