Browse Source

#2597 use textContent instead of innerText for code snippet content (#2598)

pull/2681/head
aSemy 2 years ago committed by GitHub
parent
commit
8f3beed1fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      examples/web-landing/src/jsMain/kotlin/com/sample/content/CodeSnippets.kt

2
examples/web-landing/src/jsMain/kotlin/com/sample/content/CodeSnippets.kt

@ -10,7 +10,7 @@ import org.jetbrains.compose.web.css.keywords.auto
import org.w3c.dom.HTMLElement import org.w3c.dom.HTMLElement
private fun HTMLElement.setHighlightedCode(code: String) { private fun HTMLElement.setHighlightedCode(code: String) {
innerText = code textContent = code
HighlightJs.highlightElement(this) HighlightJs.highlightElement(this)
} }

Loading…
Cancel
Save