aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/warpc/js/renderkatex.js
blob: 5c3e183754fd46b67195b433cb90b1dd0959ed66 (plain)
1
2
3
4
5
6
7
8
9
10
11
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);