Fixing Highlight.js

This commit is contained in:
Jean Ouina 2020-08-11 02:08:48 +02:00
parent 3ef6f4d90e
commit d2a715cfd6
4 changed files with 70 additions and 70 deletions

View File

@ -119,7 +119,7 @@ class CodeContent extends React.Component {
if(!messageModule1)messageModule1 = BDModules.get(e => e.markup)[0]
if(!messageModule2)messageModule2 = BDModules.get(e => e.messageContent)[0]
if(!scrollbarModule1)scrollbarModule1 = BDModules.get(e => e.scrollbarGhostHairline)[0]
if(!hightlightJS)hightlightJS = BDModules.get(e => e.highlight)[0]
if(!hightlightJS)hightlightJS = BDModules.get(e => e.listLanguages)[0]
return (<div class={`${messageModule1.markup} ${messageModule2.messageContent}`}>
<pre>
<code class={`${scrollbarModule1.scrollbarGhostHairline} hljs`} dangerouslySetInnerHTML={{__html: hightlightJS.highlight(this.props.language, this.props.content).value}}>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@ export default class CodeBlock extends React.Component<CodeBlockProps> {
WebpackLoader.find(e => e.markup),
WebpackLoader.find(e => e.messageContent),
WebpackLoader.find(e => e.scrollbarGhostHairline),
WebpackLoader.find(e => e.highlight),
WebpackLoader.find(e => e.listLanguages),
WebpackLoader.find(e => e.marginBottom8)
])
}