Socket
Socket
Sign inDemoInstall

notebookjs-katex

Package Overview
Dependencies
17
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

.github/workflows/CI.yml

12

index.test.js

@@ -70,12 +70,2 @@ "use strict";

assert.notEqual(topic[0].indexOf('<span class="katex">'), -1);
},
'Should contain <math>': function(topic) {
assert.notEqual(topic[0].indexOf('<math>'), -1);
},
'Should contain math expression': function(topic) {
// This is brittle since it relies on what current Katex rendering style. Better ideas?
//
var expected = 'What is <span class="katex"><span class="katex-mathml"><math><semantics><mrow><mn>1</mn><mo>+</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">1 + 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.64444em;"></span><span class="strut bottom" style="height:0.72777em;vertical-align:-0.08333em;"></span><span class="base textstyle uncramped"><span class="mord mathrm">1</span><span class="mbin">+</span><span class="mord mathrm">2</span></span></span></span>?';
assert.equal(topic[0], expected);
}

@@ -128,3 +118,3 @@ },

},
'Both $$ and $ spans handled properly': {

@@ -131,0 +121,0 @@ topic: function() {

{
"name": "notebookjs-katex",
"version": "1.0.0",
"version": "1.1.0",
"description": "Process embedded math expressions in IPython Markdown cells.",

@@ -20,7 +20,7 @@ "main": "index.js",

"dependencies": {
"jsonpath": "^0.2.11",
"katex": "^0.7.1"
"jsonpath": "^1.1.1",
"katex": "0"
},
"devDependencies": {
"vows": "^0.8.1"
"vows": "0"
},

@@ -27,0 +27,0 @@ "repository": {

@@ -1,2 +0,3 @@

[![Build Status](https://travis-ci.org/bradhowes/notebookjs-katex.svg?branch=master)](https://travis-ci.org/bradhowes/notebookjs-katex)
[![CI](https://github.com/bradhowes/notebookjs-katex/workflows/CI/badge.svg)](https://github.com/bradhowes/notebookjs-katex)
[![License: MIT](https://img.shields.io/badge/License-MIT-A31F34.svg)](https://opensource.org/licenses/MIT)

@@ -18,3 +19,3 @@ # Overview

`notebookjs`'s `render` process will properly generate inline and block math HTML expressions using the
[Katex](https://github.com/Khan/KaTeX) package. I use this to perform server-side math expression rendering for
[KaTeX](https://github.com/Khan/KaTeX) package. I use this to perform server-side math expression rendering for
my blog, [Keystroke Countdown](https://keystrokecountdown.com).

@@ -34,4 +35,4 @@

```javascript
const KatexFilter = require("notebookjs-katex");
const kf = new KatexFilter();
var KatexFilter = require("notebookjs-katex");
var kf = new KatexFilter();

@@ -47,3 +48,3 @@ var ipynb = JSON.parse(fs.readFileSync('/path/to/notebook.ipynb'));

The `KatexFilter` constructor takes an optional configuration object which will be given to the Katex `render`
The `KatexFilter` constructor takes an optional configuration object which will be given to the KaTeX `render`
method. See the [docs](https://github.com/Khan/KaTeX#rendering-options) for details. Note that `KatexFilter`

@@ -57,3 +58,3 @@ always sets `throwOnError` to `false`, and `displayMode` will be set depending on the delimiters surrounding the

JSON file.
* [katex](https://github.com/Khan/KaTeX) -- performs the rendering of the LaTeX commands.
* [KaTeX](https://github.com/Khan/KaTeX) -- performs the rendering of the LaTeX commands.

@@ -60,0 +61,0 @@ # Tests

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc