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

rebber

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rebber - npm Package Compare versions

Comparing version 3.1.4 to 3.1.5

7

dist/types/image.js

@@ -6,2 +6,6 @@ "use strict";

var defaultInlineMatcher = function defaultInlineMatcher(node, parent) {
return parent.type === 'paragraph' && parent.children.length - 1 || parent.type === 'heading';
};
var defaultMacro = function defaultMacro(node) {

@@ -41,4 +45,5 @@ /*

var macro = options.image ? options.image : defaultMacro;
var inlineMatcher = options.inlineMatcher ? options.inlineMatcher : defaultInlineMatcher;
if (parent.type === 'paragraph' && parent.children.length - 1) {
if (inlineMatcher(node, parent)) {
macro = options.inlineImage ? options.inlineImage : defaultInline;

@@ -45,0 +50,0 @@ }

@@ -11,2 +11,4 @@ "use strict";

var clone = require('clone');
var one = require('../one');

@@ -42,3 +44,10 @@ /* Expose. */

var macro = ctx.table || defaultMacro;
return macro(ctx, node);
var overriddenCtx = clone(ctx);
overriddenCtx.image = overriddenCtx.image ? overriddenCtx.image : {};
overriddenCtx.image.inlineMatcher = function () {
return true;
};
return macro(overriddenCtx, node);
}

4

package.json
{
"name": "rebber",
"version": "3.1.4",
"version": "3.1.5",
"description": "Stringifies MDAST to LaTeX",

@@ -38,3 +38,3 @@ "repository": "https://github.com/zestedesavoir/zmarkdown/tree/master/packages/rebber",

},
"gitHead": "41ba346f4cb8a52f3ca658c7c217f578cbfca661"
"gitHead": "b05f25a9f9f7be3c2987fb3c07f48cc1b43ca2aa"
}
/* Expose. */
module.exports = image
const defaultInlineMatcher = (node, parent) => {
return (parent.type === 'paragraph' && parent.children.length - 1) ||
parent.type === 'heading'
}
const defaultMacro = (node) => {

@@ -43,3 +48,5 @@ /*

let macro = options.image ? options.image : defaultMacro
if (parent.type === 'paragraph' && parent.children.length - 1) {
const inlineMatcher = options.inlineMatcher ? options.inlineMatcher : defaultInlineMatcher
if (inlineMatcher(node, parent)) {
macro = options.inlineImage ? options.inlineImage : defaultInline

@@ -46,0 +53,0 @@ }

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

const clone = require('clone')
const one = require('../one')

@@ -27,3 +29,8 @@

const macro = ctx.table || defaultMacro
return macro(ctx, node)
const overriddenCtx = clone(ctx)
overriddenCtx.image = overriddenCtx.image ? overriddenCtx.image : {}
overriddenCtx.image.inlineMatcher = () => true
return macro(overriddenCtx, node)
}
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