Socket
Socket
Sign inDemoInstall

marked-terminal

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marked-terminal - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

20

index.js

@@ -5,6 +5,8 @@ "use strict";

var Table = require('cli-table');
var assign = require('lodash.assign');
var cardinal = require('cardinal');
var emoji = require('node-emoji');
const ansiEscapes = require('ansi-escapes');
const supportsHyperlinks = require('supports-hyperlinks');
var TABLE_CELL_SPLIT = '^*||*^';

@@ -55,3 +57,3 @@ var TABLE_ROW_WRAP = '*|*|*|*';

function Renderer(options, highlightOptions) {
this.o = assign({}, defaultOptions, options);
this.o = Object.assign({}, defaultOptions, options);
this.tab = sanitizeTab(this.o.tab, defaultOptions.tab);

@@ -141,3 +143,3 @@ this.tableSettings = this.o.tableOptions;

Renderer.prototype.table = function(header, body) {
var table = new Table(assign({}, {
var table = new Table(Object.assign({}, {
head: generateTableRow(header)[0]

@@ -200,6 +202,10 @@ }, this.tableSettings));

var out = '';
if (hasText) out += this.emoji(text) + ' (';
out += this.o.href(href);
if (hasText) out += ')';
if (supportsHyperlinks.stdout) {
out = ansiEscapes.link(text?this.emoji(text):href, href);
}else{
if (hasText) out += this.emoji(text) + ' (';
out += this.o.href(href);
if (hasText) out += ')';
}
return this.o.link(out);

@@ -334,3 +340,3 @@ };

'((?:' + indent + ')+)' + // Indentation of sub point
'(' + POINT_REGEX + '(?:.*)+)$', 'm'); // Body of subpoint
'(' + POINT_REGEX + '(?:.*)+)$', 'gm'); // Body of subpoint
return body.replace(regex, '$1\n' + indent + '$2$3');

@@ -337,0 +343,0 @@ }

{
"name": "marked-terminal",
"version": "3.1.1",
"version": "3.2.0",
"description": "A custom render for marked to output to the Terminal",
"main": "index.js",
"scripts": {
"test": "mocha tests/*.js --reporter spec"
"test": "FORCE_HYPERLINK=0 mocha tests/*.js --reporter spec"
},

@@ -22,10 +22,11 @@ "files": [

"peerDependencies": {
"marked": "^0.4.0 || ^0.5.0"
"marked": "^0.4.0 || ^0.5.0 || ^0.6.0"
},
"dependencies": {
"ansi-escapes": "^3.1.0",
"cardinal": "^2.1.1",
"chalk": "^2.4.1",
"cli-table": "^0.3.1",
"lodash.assign": "^4.2.0",
"node-emoji": "^1.4.1"
"node-emoji": "^1.4.1",
"supports-hyperlinks": "^1.0.1"
},

@@ -36,3 +37,3 @@ "directories": {

"devDependencies": {
"marked": "^0.5.0",
"marked": "^0.6.0",
"mocha": "^5.2.0"

@@ -39,0 +40,0 @@ },

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