mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
docs: Fix \set documentation (#3646)
Work around `|` in tables See https://github.com/facebook/docusaurus/issues/2004
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// https://github.com/bradhowes/remarkable-katex/blob/master/index.js
|
||||
// Modified here to require("../..") instead of require("katex")
|
||||
// and add options {trust: true, strict: false}.
|
||||
// and add options {trust: true, strict: false, macros}.
|
||||
|
||||
/* MIT License
|
||||
|
||||
@@ -25,6 +25,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
const macros = {}; // allow sharing macros within a page
|
||||
|
||||
/**
|
||||
* Plugin for Remarkable Markdown processor which transforms $..$ and $$..$$ sequences into math HTML using the
|
||||
* Katex package.
|
||||
@@ -41,7 +43,7 @@ module.exports = (md, options) => {
|
||||
*/
|
||||
const renderKatex = (source, displayMode) => katex.renderToString(source,
|
||||
{displayMode: displayMode, throwOnError: false,
|
||||
trust: true, strict: false});
|
||||
trust: true, strict: false, macros});
|
||||
|
||||
/**
|
||||
* Parse '$$' as a block. Based off of similar method in remarkable.
|
||||
|
Reference in New Issue
Block a user