Socket
Socket
Sign inDemoInstall

markdown-to-jsx

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-to-jsx - npm Package Compare versions

Comparing version 6.6.7 to 6.6.8

35

index.cjs.js

@@ -182,7 +182,22 @@ 'use strict';

var TABLE_ROW_SPLIT = / *\| */;
var TEXT_BOLD_R = /^[*_]{2}([\s\S]+?)[*_]{2}(?!\*|_)/;
var TEXT_EMPHASIZED_R = /^[*_]{1}([\s\S]+?)[*_]{1}(?!\*|_)/;
/**
* (delimiter regex)((?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)
*
* detects other inline syntaxes and ignores them; this helps alleviate issues like
* **Foo `**` baz**
*
* Where the ** inside the backticks would be detected as the end of the bolding.
*/
/**
* Bolding requires the same character to be used twice, so we do a detect for which
* one is in use, then double-check it's used a second time and then twice at the end.
*/
var TEXT_BOLD_R = /^([*_])\1((?:(?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)\1?)\1{2}/;
var TEXT_EMPHASIZED_R = /^([*_])((?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)\1/;
var TEXT_STRIKETHROUGHED_R = /^~~((?:.*?([`~]).*?\2.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)~~/;
var TEXT_ESCAPED_R = /^\\([^0-9A-Za-z\s])/;
var TEXT_PLAIN_R = /^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i;
var TEXT_STRIKETHROUGHED_R = /^~~(?=\S)([\s\S]*?\S)~~/;
var TRIM_NEWLINES_AND_TRAILING_WHITESPACE_R = /(^\n+|(\n|\s)+$)/g;

@@ -1348,3 +1363,9 @@

order: PARSE_PRIORITY_MED,
parse: parseCaptureInline,
parse: function parse(capture, _parse8, state) {
return {
// capture[1] -> the syntax control character
// capture[2] -> inner content
content: _parse8(capture[2], state)
};
},
react: function react(node, output, state) {

@@ -1362,5 +1383,7 @@ return h(

order: PARSE_PRIORITY_LOW,
parse: function parse(capture, _parse8, state) {
parse: function parse(capture, _parse9, state) {
return {
content: _parse8(capture[2] || capture[1], state)
// capture[1] -> opening * or _
// capture[2] -> inner content
content: _parse9(capture[2], state)
};

@@ -1367,0 +1390,0 @@ },

@@ -168,7 +168,22 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var TABLE_ROW_SPLIT = / *\| */;
var TEXT_BOLD_R = /^[*_]{2}([\s\S]+?)[*_]{2}(?!\*|_)/;
var TEXT_EMPHASIZED_R = /^[*_]{1}([\s\S]+?)[*_]{1}(?!\*|_)/;
/**
* (delimiter regex)((?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)
*
* detects other inline syntaxes and ignores them; this helps alleviate issues like
* **Foo `**` baz**
*
* Where the ** inside the backticks would be detected as the end of the bolding.
*/
/**
* Bolding requires the same character to be used twice, so we do a detect for which
* one is in use, then double-check it's used a second time and then twice at the end.
*/
var TEXT_BOLD_R = /^([*_])\1((?:(?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)\1?)\1{2}/;
var TEXT_EMPHASIZED_R = /^([*_])((?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)\1/;
var TEXT_STRIKETHROUGHED_R = /^~~((?:.*?([`~]).*?\2.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)~~/;
var TEXT_ESCAPED_R = /^\\([^0-9A-Za-z\s])/;
var TEXT_PLAIN_R = /^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i;
var TEXT_STRIKETHROUGHED_R = /^~~(?=\S)([\s\S]*?\S)~~/;
var TRIM_NEWLINES_AND_TRAILING_WHITESPACE_R = /(^\n+|(\n|\s)+$)/g;

@@ -1334,3 +1349,9 @@

order: PARSE_PRIORITY_MED,
parse: parseCaptureInline,
parse: function parse(capture, _parse8, state) {
return {
// capture[1] -> the syntax control character
// capture[2] -> inner content
content: _parse8(capture[2], state)
};
},
react: function react(node, output, state) {

@@ -1348,5 +1369,7 @@ return h(

order: PARSE_PRIORITY_LOW,
parse: function parse(capture, _parse8, state) {
parse: function parse(capture, _parse9, state) {
return {
content: _parse8(capture[2] || capture[1], state)
// capture[1] -> opening * or _
// capture[2] -> inner content
content: _parse9(capture[2], state)
};

@@ -1353,0 +1376,0 @@ },

@@ -164,7 +164,22 @@ /* @jsx h */

const TABLE_ROW_SPLIT = / *\| */;
const TEXT_BOLD_R = /^[*_]{2}([\s\S]+?)[*_]{2}(?!\*|_)/;
const TEXT_EMPHASIZED_R = /^[*_]{1}([\s\S]+?)[*_]{1}(?!\*|_)/;
/**
* (delimiter regex)((?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)
*
* detects other inline syntaxes and ignores them; this helps alleviate issues like
* **Foo `**` baz**
*
* Where the ** inside the backticks would be detected as the end of the bolding.
*/
/**
* Bolding requires the same character to be used twice, so we do a detect for which
* one is in use, then double-check it's used a second time and then twice at the end.
*/
const TEXT_BOLD_R = /^([*_])\1((?:(?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)\1?)\1{2}/;
const TEXT_EMPHASIZED_R = /^([*_])((?:.*?([`~]).*?\3.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)\1/;
const TEXT_STRIKETHROUGHED_R = /^~~((?:.*?([`~]).*?\2.*?)*|(?:.*?[\[(<].*?[\])>].*?)*|.+?)~~/;
const TEXT_ESCAPED_R = /^\\([^0-9A-Za-z\s])/;
const TEXT_PLAIN_R = /^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i;
const TEXT_STRIKETHROUGHED_R = /^~~(?=\S)([\s\S]*?\S)~~/;
const TRIM_NEWLINES_AND_TRAILING_WHITESPACE_R = /(^\n+|(\n|\s)+$)/g;

@@ -1438,3 +1453,9 @@

order: PARSE_PRIORITY_MED,
parse: parseCaptureInline,
parse(capture, parse, state) {
return {
// capture[1] -> the syntax control character
// capture[2] -> inner content
content: parse(capture[2], state),
};
},
react(node, output, state) {

@@ -1454,3 +1475,5 @@ return (

return {
content: parse(capture[2] || capture[1], state),
// capture[1] -> opening * or _
// capture[2] -> inner content
content: parse(capture[2], state),
};

@@ -1457,0 +1480,0 @@ },

2

package.json

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "6.6.7",
"version": "6.6.8",
"engines": {

@@ -9,0 +9,0 @@ "node": ">= 4"

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