mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-06 13:04:53 +08:00
Fix Highlight hook
This commit is contained in:
parent
fe50c80786
commit
9c9fe2badd
1 changed files with 3 additions and 4 deletions
|
@ -39,10 +39,9 @@ const Highlight = {
|
|||
updateDOM() {
|
||||
const code = this.sourceEl.innerText;
|
||||
|
||||
highlight(code, this.props.language).then((html) => {
|
||||
this.targetEl.innerHTML = html;
|
||||
this.el.setAttribute("data-highlighted", "");
|
||||
});
|
||||
const html = highlight(code, this.props.language);
|
||||
this.targetEl.innerHTML = html;
|
||||
this.el.setAttribute("data-highlighted", "");
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue