KaTeX/KaTeX

Suggestion: add a property called shouldRender to renderMathInElement options

Open

#691 opened on 2017年5月3日

GitHub で見る
 (3 comments) (1 reaction) (0 assignees)JavaScript (17,636 stars) (1,140 forks)batch import
enhancementgood first issue

説明

I would like to suggest adding an optional property called shouldRender to the renderMathInElement options which if provided would accept the current HTML element being considered and return a Boolean indicating whether or not to render math inside it. This would be used in place of ignoreTags. Alternatively you could make ignoreTags optionally a function in the same way but the name makes less sense. This would neatly cover any scenario for opting out of math rendering and users could come up with their own conventions (like putting the attribute data-render-math="false" on elements they don't want rendered).

コントリビューターガイド

Suggestion: add a property called shouldRender to renderMathInElement options · KaTeX/KaTeX#691 | Good First Issue