mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Prettier improvements
This commit is contained in:
parent
b5f68cf5c9
commit
fd39923907
1 changed files with 5 additions and 1 deletions
|
|
@ -262,7 +262,11 @@ export const parsePreparedContent = async (
|
|||
if (e.textContent) {
|
||||
const att = hljs.highlightAuto(e.textContent)
|
||||
const code = window.document.createElement('code')
|
||||
const langClass = `hljs language-${att.language}` + att.second_best?.language ? ` language-${att.second_best?.language}` : ''
|
||||
const langClass =
|
||||
`hljs language-${att.language}` +
|
||||
(att.second_best?.language
|
||||
? ` language-${att.second_best?.language}`
|
||||
: '')
|
||||
code.setAttribute('class', langClass)
|
||||
code.innerHTML = att.value
|
||||
e.replaceWith(code)
|
||||
|
|
|
|||
Loading…
Reference in a new issue