mirror of https://github.com/zer0bin-dev/zer0bin
fix: 🐛 Fix marked import
This commit is contained in:
parent
1ffb3abdfd
commit
4ed5065bef
|
@ -1,7 +1,7 @@
|
|||
import "no-darkreader"
|
||||
|
||||
import hljs from "highlight.js"
|
||||
import marked from "marked"
|
||||
import { marked } from "marked"
|
||||
import JSConfetti from "js-confetti"
|
||||
import Scrollbar from "smooth-scrollbar"
|
||||
|
||||
|
@ -130,8 +130,7 @@ function viewPaste(content: string, views: string) {
|
|||
for (let i = 1; i <= content.split("\n").length; i++) {
|
||||
lineNumbers.innerHTML = lineNumbers.innerHTML + `${i}<br>`
|
||||
}
|
||||
if (content.substring(0, 3) == "---") {
|
||||
console.log(marked.parse(content))
|
||||
if (content.startsWith("---")) {
|
||||
codeView.innerHTML = marked.parse(content)
|
||||
} else {
|
||||
codeView.innerHTML = hljs.highlightAuto(content).value
|
||||
|
|
Loading…
Reference in New Issue