Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrandrushik committed Oct 3, 2024
1 parent 57d320b commit 2961fe7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ async function call(callback: Callback): Promise<void> {
querySelector = '.yfm-latex',
nodes,
sanitize = identity,
strict = 'warn',
trust = false,
...rest
} = {}) => {
const nodesList: Element[] = Array.from(
Expand All @@ -51,12 +53,11 @@ async function call(callback: Callback): Promise<void> {
const content = attr(element, 'data-content');
const options = JSON.parse(attr(element, 'data-options') || '{}');

delete options.strict;
delete options.trust;

element.innerHTML = sanitize(
katex.renderToString(content, {
...options,
strict,
trust,
...rest,
}),
);
Expand Down

0 comments on commit 2961fe7

Please sign in to comment.