New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

asciidoctor-katex

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asciidoctor-katex - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

80

dist/asciidoctor-katex.js
(function (Opal) {
function initializeGeneratedCode () {
function initialize (Opal) {
/* Generated by Opal 0.11.1 */

@@ -17,3 +17,3 @@ Opal.modules["asciidoctor/katex/version"] = function(Opal) {

Opal.const_set($nesting[0], 'VERSION', "0.1.0")
Opal.const_set($nesting[0], 'VERSION', "0.1.1")
})($nesting[0], $nesting)

@@ -381,27 +381,25 @@ })($nesting[0], $nesting)

var katexModule;
var mainModule
function resolveModule (name) {
if (!katexModule) {
initializeGeneratedCode();
katexModule = Opal.const_get_qualified(Opal.Asciidoctor, 'Katex');
if (!mainModule) {
checkAsciidoctor()
initialize(Opal)
mainModule = Opal.const_get_qualified(Opal.Asciidoctor, 'Katex')
}
if (!name) {
return katexModule
return mainModule
}
return Opal.const_get_qualified(katexModule, name);
return Opal.const_get_qualified(mainModule, name)
}
/**
* @return {String} version of this extension.
*/
function getVersion () {
return resolveModule().$$const.VERSION.toString();
function checkAsciidoctor () {
if (typeof Opal.Asciidoctor === 'undefined') {
throw new TypeError('Asciidoctor.js is not loaded')
}
}
/**
* Creates and configures a new instance of Asciidoctor::Katex::Treeprocessor.
*
* @param {Object} opts
* @param {Object} opts.katex The katex object to use for rendering.
* @param opts.katex The katex object to use for rendering.
* Defaults to `require('katex')`.

@@ -413,12 +411,12 @@ * @param {boolean} opts.requireStemAttr `true` to not process math expressions

* Defaults to empty object.
* @return {TreeProcessor}
* @return A new instance of `Asciidoctor::Katex::Treeprocessor`.
*/
function TreeProcessor (opts) {
opts = opts || {};
opts = opts || {}
var KatexAdapterClass = resolveModule('KatexAdapter');
var TreeprocessorClass = resolveModule('Treeprocessor');
var KatexAdapterClass = resolveModule('KatexAdapter')
var TreeprocessorClass = resolveModule('Treeprocessor')
var katex = opts.katex || require('katex');
var adapter = KatexAdapterClass.$new(Opal.hash(opts.katexOptions || {}), katex);
var katex = opts.katex || require('katex')
var adapter = KatexAdapterClass.$new(Opal.hash(opts.katexOptions || {}), katex)

@@ -428,28 +426,40 @@ return TreeprocessorClass.$new(Opal.hash({

katex_renderer: adapter,
}));
}))
}
/**
* @return {string} Version of this extension.
*/
function getVersion () {
return resolveModule().$$const.VERSION.toString();
}
/**
* Creates and configures the Katex extension and registers it into the given
* extensions registry.
*
* @param {Object} registry The Asciidoctor extensions registry to register this
* extension into. It should be `Asciidoctor().Extensions` or
* `Asciidoctor.Extensions.create()`.
* @param {Object} opts See {TreeProcessor}.
* @return The given *registry*.
* @param registry The Asciidoctor extensions registry to register this
* extension into. Defaults to the global Asciidoctor registry.
* @param {Object} opts See {TreeProcessor} (optional).
* @throws {TypeError} if the *registry* is invalid or Asciidoctor.js is not loaded.
*/
function register (registry, opts) {
if (!registry) {
checkAsciidoctor()
registry = Opal.Asciidoctor.Extensions
}
var processor = TreeProcessor(opts);
// global registry
if (typeof registry.register === 'function') {
registry.register(function () {
this.treeProcessor(processor);
this.treeProcessor(processor)
})
// custom registry
} else if (typeof registry.block === 'function') {
registry.treeProcessor(processor);
registry.treeProcessor(processor)
} else {
throw new TypeError('Invalid registry object');
throw new TypeError('Invalid registry object')
}
return registry;
return registry
}

@@ -461,8 +471,8 @@

register: register,
};
}
if (typeof module !== 'undefined' && module.exports) {
module.exports = facade;
module.exports = facade
}
return facade;
return facade
})(Opal);
{
"name": "asciidoctor-katex",
"version": "0.1.0",
"version": "0.1.1",
"description": "Asciidoctor extension that converts latexmath to HTML using KaTeX at build-time",

@@ -33,6 +33,10 @@ "author": "Jakub Jirutka <jakub@jirutka.cz>",

"dependencies": {
"asciidoctor.js": "~1.5.6",
"katex": "^0.9.0",
"opal-runtime": "^1.0.3"
"katex": "^0.9.0"
},
"devDependencies": {
"asciidoctor.js": "~1.5.6"
},
"peerDependencies": {
"asciidoctor.js": "~1.5.6"
}
}
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