Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mathjax-img

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathjax-img - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

test/mathjax-img-browser.html

2

browser/img.js

@@ -1,1 +0,1 @@

(()=>{"use strict";const t=MathJax._.input.tex.Configuration,e=t.Configuration,a=(t.ConfigurationHandler,t.ParserConfiguration,MathJax._.input.tex.SymbolMap),n=(a.parseResult,a.AbstractSymbolMap,a.RegExpMap,a.AbstractParseMap,a.CharacterMap,a.DelimiterMap,a.MacroMap,a.CommandMap),i=(a.EnvironmentMap,MathJax._.input.tex.TexError.default);let r={};const o=function(t){if(""===t)return"";if(t.match(/^\s*([-+]?(\.\d+|\d+(\.\d*)?))\s*(pt|em|ex|mu|px|mm|cm|in|pc)\s*$/))return t.replace(/ /g,"");throw new i("BadImageDimen","Bad dimension for image: %1",t)};r.Img=function(t,e){const a=t.GetBrackets(e,""),n={src:"",alt:"",valign:"",width:"",height:""};if(a.match(/[,=]/))for(const t of a.split(/\s*,\s*/)){const[a,...r]=t.split(/\s*=\s*/);if(!n.hasOwnProperty(a))throw new i("UnknownKey",'Unknown parameter "%1" in %2',a,e);n[a]=o(r.join("="))}else n.valign=o(a),n.width=o(t.GetBrackets(e,"")),n.height=o(t.GetBrackets(e,""));n.alt=t.GetBrackets(e,""),n.src=t.GetArgument(e),n.valign||delete n.valign,n.width||delete n.width,n.height||delete n.height,n.alt||delete n.alt,t.Push(t.create("token","mglyph",n))},new n("img",{img:"Img"},r);e.create("img",{handler:{macro:["img"]}})})();
(()=>{"use strict";const t=MathJax._.input.tex.Configuration,e=t.Configuration,a=(t.ConfigurationHandler,t.ParserConfiguration,MathJax._.input.tex.TokenMap),n=(a.parseResult,a.AbstractTokenMap,a.RegExpMap,a.AbstractParseMap,a.CharacterMap,a.DelimiterMap,a.MacroMap,a.CommandMap),i=(a.EnvironmentMap,MathJax._.input.tex.TexError.default);let r={};const o=function(t){if(""===t)return"";if(t.match(/^\s*([-+]?(\.\d+|\d+(\.\d*)?))\s*(pt|em|ex|mu|px|mm|cm|in|pc)\s*$/))return t.replace(/ /g,"");throw new i("BadImageDimen","Bad dimension for image: %1",t)};r.Img=function(t,e){const a=t.GetBrackets(e,""),n={src:"",alt:"",valign:"",width:"",height:""};if(a.match(/[,=]/))for(const t of a.split(/\s*,\s*/)){const[a,...r]=t.split(/\s*=\s*/);if(!n.hasOwnProperty(a))throw new i("UnknownKey",'Unknown parameter "%1" in %2',a,e);n[a]=o(r.join("="))}else n.valign=o(a),n.width=o(t.GetBrackets(e,"")),n.height=o(t.GetBrackets(e,""));n.alt=t.GetBrackets(e,""),n.src=t.GetArgument(e),n.valign||delete n.valign,n.width||delete n.width,n.height||delete n.height,n.alt||delete n.alt,t.Push(t.create("token","mglyph",n))},new n("img",{img:"Img"},r);e.create("img",{handler:{macro:["img"]}})})();

@@ -5,2 +5,9 @@ # Changelog

### [4.0.1](https://github.com/pkra/mathjax-img/compare/v4.0.0...v4.0.1) (2023-11-08)
### Bug Fixes
* adjust to mathjax v4-beta.4 ([2a2f722](https://github.com/pkra/mathjax-img/commit/2a2f722d57a35d011ebfd8e65c1027185fd2fdda)), closes [#25](https://github.com/pkra/mathjax-img/issues/25)
## [4.0.0](https://github.com/pkra/mathjax-img/compare/v4.0.0-1...v4.0.0) (2023-09-04)

@@ -7,0 +14,0 @@

import { Configuration } from "mathjax-full/mjs/input/tex/Configuration.js";
import { CommandMap } from "mathjax-full/mjs/input/tex/SymbolMap.js";
import { CommandMap } from "mathjax-full/mjs/input/tex/TokenMap.js";
import TexError from "mathjax-full/mjs/input/tex/TexError.js";

@@ -4,0 +4,0 @@ let imgMethods = {};

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "4.0.0",
"version": "4.0.1",
"description": "img extension for MathJax's TeX input",

@@ -28,3 +28,3 @@ "keywords": [

"devDependencies": {
"mathjax-full": "4.0.0-beta.3",
"mathjax-full": "4.0.0-beta.4",
"standard-version": "9.5.0",

@@ -31,0 +31,0 @@ "terser-webpack-plugin": "5.3.0",

@@ -26,3 +26,3 @@ /*************************************************************

import { Configuration } from "mathjax-full/mjs/input/tex/Configuration.js";
import { CommandMap } from "mathjax-full/mjs/input/tex/SymbolMap.js";
import { CommandMap } from "mathjax-full/mjs/input/tex/TokenMap.js";
import TexError from "mathjax-full/mjs/input/tex/TexError.js";

@@ -29,0 +29,0 @@ import TexParser from "mathjax-full/mjs/input/tex/TexParser.js";

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc