Skip to content

Commit

Permalink
feat: allow controlling math behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Enter-tainer committed May 7, 2024
1 parent d034bf9 commit e8c78f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import formatCode from './code/format-code.js';
import formatMath from './math/format-math.js';

export default function remarkCodeFormat() {
export default function remarkCodeFormat(options) {
return function transformer(tree) {
formatCode(tree);
formatMath(tree);
if (options && options.math) {
formatMath(tree);
}
};
}

0 comments on commit e8c78f0

Please sign in to comment.