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.5 to 4.0.0

3

dist/escaper.js

@@ -25,5 +25,4 @@ "use strict";

'~': '\\textasciitilde{}'
/* Encode special characters in `value`. */
};
/* Encode special characters in `value`. */

@@ -30,0 +29,0 @@ function encode(value) {

"use strict";
/* Expose. */
module.exports = code;
var detab = require('detab');

@@ -26,5 +25,6 @@ var defaultMacro = function defaultMacro(content, lang) {

function code(ctx, node) {
module.exports = function code(ctx, node) {
var value = node.value ? detab("".concat(node.value, "\n")) : '';
var macro = ctx.code || defaultMacro;
return macro(node.value, node.lang);
}
return macro(value, node.lang);
};
"use strict";
// TODO: make it customizable
var collapse = require('collapse-white-space');
/* Expose. */
module.exports = inlineCode;
var escape = require('../escaper');
function inlineCode(ctx, node) {
var finalCode = escape(node.value);
module.exports = function inlineCode(ctx, node) {
var finalCode = escape(collapse(node.value));
return "\\texttt{".concat(finalCode, "}");
}
};
"use strict";
/* Dependencies. */
var trimLines = require('trim-lines');
var escaper = require('../escaper');
/* Expose. */
/* Stringify a text `node`. */
module.exports = text;
/* Stringify a text `node`. */
function text(ctx, node, index, parent) {
var value = node.value;
module.exports = function text(ctx, node, index, parent) {
var value = trimLines(node.value);
return isLiteral(parent) ? value : escaper(value, ctx.escapes);
} // TODO: `tagName` isn't part of MDAST!
}; // TODO: `tagName` isn't part of MDAST!

@@ -16,0 +15,0 @@ /* Check if content of `node` should not be escaped. */

{
"name": "rebber",
"version": "3.1.5",
"version": "4.0.0",
"description": "Stringifies MDAST to LaTeX",

@@ -34,7 +34,10 @@ "repository": "https://github.com/zestedesavoir/zmarkdown/tree/master/packages/rebber",

"dependencies": {
"collapse-white-space": "^1.0.5",
"detab": "^2.0.2",
"has": "^1.0.1",
"mdast-util-definitions": "^1.2.3",
"trim-lines": "^1.1.2",
"xtend": "^4.0.1"
},
"gitHead": "b05f25a9f9f7be3c2987fb3c07f48cc1b43ca2aa"
"gitHead": "83d21c0fd4a36065ebd1023c7083827939d32cea"
}

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

/* Expose. */
module.exports = code
const detab = require('detab')

@@ -22,5 +21,6 @@ const defaultMacro = (content, lang) => {

/* Stringify a Blockquote `node`. */
function code (ctx, node) {
module.exports = function code (ctx, node) {
const value = node.value ? detab(`${node.value}\n`) : ''
const macro = ctx.code || defaultMacro
return macro(node.value, node.lang)
return macro(value, node.lang)
}

@@ -1,10 +0,7 @@

// TODO: make it customizable
/* Expose. */
module.exports = inlineCode
const collapse = require('collapse-white-space')
const escape = require('../escaper')
function inlineCode (ctx, node) {
const finalCode = escape(node.value)
module.exports = function inlineCode (ctx, node) {
const finalCode = escape(collapse(node.value))
return `\\texttt{${finalCode}}`
}
/* Dependencies. */
const trimLines = require('trim-lines')
const escaper = require('../escaper')
/* Expose. */
module.exports = text
/* Stringify a text `node`. */
function text (ctx, node, index, parent) {
const value = node.value
module.exports = function text (ctx, node, index, parent) {
const value = trimLines(node.value)

@@ -11,0 +9,0 @@ return isLiteral(parent) ? value : escaper(value, ctx.escapes)

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