Skip to content

Commit

Permalink
JS-3473: latex exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mhlv committed Dec 6, 2023
1 parent bd2e2c0 commit 07a0ca0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ts/component/block/embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,16 @@ const BlockEmbed = observer(class BlockEmbedIndex extends React.Component<I.Bloc

const lang = this.getLang();
const { withPreview } = this.state;
const { block } = this.props;
const { processor } = block.content;

if (lang) {
this.input.innerHTML = UtilCommon.sanitize(Prism.highlight(value, Prism.languages[lang], lang));
} else {
this.input.innerText = value;
};

if (!withPreview) {
if (!withPreview || processor == I.EmbedProcessor.Latex) {
this.setContent(value);
};
};
Expand Down

0 comments on commit 07a0ca0

Please sign in to comment.