mirror of
https://github.com/gohugoio/hugo.git
synced 2025-06-29 04:09:51 +00:00
12 lines
331 B
JavaScript
12 lines
331 B
JavaScript
|
import { readInput, writeOutput } from './common';
|
||
|
import katex from 'katex';
|
||
|
|
||
|
const render = function (input) {
|
||
|
const data = input.data;
|
||
|
const expression = data.expression;
|
||
|
const options = data.options;
|
||
|
writeOutput({ header: input.header, data: { output: katex.renderToString(expression, options) } });
|
||
|
};
|
||
|
|
||
|
readInput(render);
|