Socket
Socket
Sign inDemoInstall

react-marksome

Package Overview
Dependencies
3
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

112

dist/react-marksome.cjs.development.js

@@ -10,26 +10,20 @@ 'use strict';

function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
const STRONG_TEXT_REGEXP = /([*_])\1\1?((?:\[.*?\][([].*?[)\]]|.)*?)\1?\1\1/g;
const EMPHASIZED_TEXT_REGEXP = /([*_])((?:\[.*?\][([].*?[)\]]|.)*?)\1/g;
const REFERENCE_LINK_TEXT_REGEXP = /\[([^\]]*)\] ?\[([^\]]*)\]/g;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
function matchAll(regexp, text, onMatch) {
let match;
while ((match = regexp.exec(text)) !== null) {
onMatch(match);
}
return target;
}
var STRONG_TEXT_REGEXP = /([*_])\1\1?((?:\[.*?\][([].*?[)\]]|.)*?)\1?\1\1/g;
var EMPHASIZED_TEXT_REGEXP = /([*_])((?:\[.*?\][([].*?[)\]]|.)*?)\1/g;
var REFERENCE_LINK_TEXT_REGEXP = /\[([^\]]*)\] ?\[([^\]]*)\]/g;
function parseSegments(text) {
var matches = [];
Array.from(text.matchAll(REFERENCE_LINK_TEXT_REGEXP)).forEach(function (referenceLinkRegExpMatch) {
var innerText = referenceLinkRegExpMatch[1];
var reference = referenceLinkRegExpMatch[2];
var startIndex = referenceLinkRegExpMatch.index;
const matches = [];
matchAll(REFERENCE_LINK_TEXT_REGEXP, text, referenceLinkRegExpMatch => {
const innerText = referenceLinkRegExpMatch[1];
const reference = referenceLinkRegExpMatch[2];
const startIndex = referenceLinkRegExpMatch.index;

@@ -40,14 +34,14 @@ if (!innerText || !reference || startIndex == null) {

var endIndex = startIndex + referenceLinkRegExpMatch[0].length;
const endIndex = startIndex + referenceLinkRegExpMatch[0].length;
matches.push({
type: 'reference-link',
innerText: innerText,
reference: reference,
startIndex: startIndex,
endIndex: endIndex,
innerText,
reference,
startIndex,
endIndex,
offset: 1
});
});
Array.from(text.matchAll(STRONG_TEXT_REGEXP)).forEach(function (strongRegExpMatch) {
var inlineMatch = getInlineMatchFromRegexpMatch(strongRegExpMatch, 'strong');
matchAll(STRONG_TEXT_REGEXP, text, strongRegExpMatch => {
const inlineMatch = getInlineMatchFromRegexpMatch(strongRegExpMatch, 'strong');

@@ -58,4 +52,4 @@ if (inlineMatch) {

});
Array.from(text.matchAll(EMPHASIZED_TEXT_REGEXP)).forEach(function (emphasisRegExpMatch) {
var inlineMatch = getInlineMatchFromRegexpMatch(emphasisRegExpMatch, 'emphasis');
matchAll(EMPHASIZED_TEXT_REGEXP, text, emphasisRegExpMatch => {
const inlineMatch = getInlineMatchFromRegexpMatch(emphasisRegExpMatch, 'emphasis');

@@ -66,5 +60,3 @@ if (inlineMatch) {

});
matches.sort(function (a, b) {
return a.startIndex - b.startIndex;
});
matches.sort((a, b) => a.startIndex - b.startIndex);
return getSegmentsFromMatches(text, matches);

@@ -74,4 +66,4 @@ }

function getInlineMatchFromRegexpMatch(regexpMatch, inlineType) {
var startIndex = regexpMatch.index;
var innerText = regexpMatch[2];
const startIndex = regexpMatch.index;
const innerText = regexpMatch[2];

@@ -82,11 +74,11 @@ if (startIndex == null || !innerText) {

var decoratedText = regexpMatch[0];
var offset = decoratedText.indexOf(innerText);
var endIndex = startIndex + decoratedText.length;
const decoratedText = regexpMatch[0];
const offset = decoratedText.indexOf(innerText);
const endIndex = startIndex + decoratedText.length;
return {
type: inlineType,
startIndex: startIndex,
endIndex: endIndex,
innerText: innerText,
offset: offset
startIndex,
endIndex,
innerText,
offset
};

@@ -100,12 +92,12 @@ }

var firstMatchStartIndex = matches[0].startIndex;
var segments = firstMatchStartIndex > 0 ? [text.slice(0, firstMatchStartIndex)] : [];
const firstMatchStartIndex = matches[0].startIndex;
const segments = firstMatchStartIndex > 0 ? [text.slice(0, firstMatchStartIndex)] : [];
while (matches.length) {
var currentMatch = matches.shift();
var currentMatchTextStart = currentMatch.startIndex + currentMatch.offset;
var innerMatches = [];
const currentMatch = matches.shift();
const currentMatchTextStart = currentMatch.startIndex + currentMatch.offset;
const innerMatches = [];
for (var i = 0; i < matches.length;) {
var otherMatch = matches[i]; // if not an inner match, continue to the next
for (let i = 0; i < matches.length;) {
const otherMatch = matches[i]; // if not an inner match, continue to the next

@@ -124,3 +116,3 @@ if (otherMatch.endIndex > currentMatch.endIndex) {

var content = getSegmentsFromMatches(currentMatch.innerText, innerMatches);
const content = getSegmentsFromMatches(currentMatch.innerText, innerMatches);

@@ -130,3 +122,3 @@ if (currentMatch.type === 'reference-link') {

type: currentMatch.type,
content: content,
content,
reference: currentMatch.reference

@@ -137,7 +129,7 @@ });

type: currentMatch.type,
content: content
content
});
}
var textAfterLastMatch = matches.length ? text.slice(currentMatch.endIndex, matches[0].startIndex) : text.slice(currentMatch.endIndex);
const textAfterLastMatch = matches.length ? text.slice(currentMatch.endIndex, matches[0].startIndex) : text.slice(currentMatch.endIndex);

@@ -152,8 +144,8 @@ if (textAfterLastMatch) {

function Marksome(_ref) {
var text = _ref.text,
references = _ref.references,
spanProps = _objectWithoutPropertiesLoose(_ref, ["text", "references"]);
var segments = React.useMemo(function () {
function Marksome({
text,
references,
...spanProps
}) {
const segments = React.useMemo(() => {
return parseSegments(text);

@@ -165,3 +157,3 @@ }, [text]);

function renderSegments(segments, references) {
return segments.map(function (segment, segmentIndex) {
return segments.map((segment, segmentIndex) => {
if (typeof segment === 'string') {

@@ -184,4 +176,4 @@ return segment;

{
var referenceValue = references == null ? void 0 : references[segment.reference];
var children = renderSegments(segment.content, references);
const referenceValue = references == null ? void 0 : references[segment.reference];
const children = renderSegments(segment.content, references);

@@ -188,0 +180,0 @@ if (!referenceValue) {

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,r=/([*_])\1\1?((?:\[.*?\][([].*?[)\]]|.)*?)\1?\1\1/g,a=/([*_])((?:\[.*?\][([].*?[)\]]|.)*?)\1/g,s=/\[([^\]]*)\] ?\[([^\]]*)\]/g;function c(e){var n=[];return Array.from(e.matchAll(s)).forEach((function(e){var t=e[1],r=e[2],a=e.index;t&&r&&null!=a&&n.push({type:"reference-link",innerText:t,reference:r,startIndex:a,endIndex:a+e[0].length,offset:1})})),Array.from(e.matchAll(r)).forEach((function(e){var t=f(e,"strong");t&&n.push(t)})),Array.from(e.matchAll(a)).forEach((function(e){var t=f(e,"emphasis");t&&n.push(t)})),n.sort((function(e,n){return e.startIndex-n.startIndex})),function e(n,t){if(!t.length)return[n];for(var r=t[0].startIndex,a=r>0?[n.slice(0,r)]:[];t.length;){for(var s=t.shift(),c=s.startIndex+s.offset,f=[],u=0;u<t.length;){var o=t[u];o.endIndex>s.endIndex?u++:(t.splice(u,1),o.startIndex-=c,o.endIndex-=c,f.push(o))}var i=e(s.innerText,f);a.push("reference-link"===s.type?{type:s.type,content:i,reference:s.reference}:{type:s.type,content:i});var l=t.length?n.slice(s.endIndex,t[0].startIndex):n.slice(s.endIndex);l&&a.push(l)}return a}(e,n)}function f(e,n){var t=e.index,r=e[2];if(null!=t&&r){var a=e[0],s=a.indexOf(r);return{type:n,startIndex:t,endIndex:t+a.length,innerText:r,offset:s}}}exports.Marksome=function(e){var r=e.text,a=e.references,s=function(e,n){if(null==e)return{};var t,r,a={},s=Object.keys(e);for(r=0;r<s.length;r++)n.indexOf(t=s[r])>=0||(a[t]=e[t]);return a}(e,["text","references"]),f=n.useMemo((function(){return c(r)}),[r]);return t.createElement("span",Object.assign({},s),function e(n,r){return n.map((function(n,a){if("string"==typeof n)return n;switch(n.type){case"strong":return t.createElement("strong",{key:a},e(n.content,r));case"emphasis":return t.createElement("em",{key:a},e(n.content,r));case"reference-link":var s=null==r?void 0:r[n.reference],c=e(n.content,r);return s?"string"==typeof s?t.createElement("a",{key:a,href:s},c):s(a,c):t.createElement("span",{key:a},c);default:return null}}))}(f,a))},exports.parseSegments=c;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e;const r=/([*_])\1\1?((?:\[.*?\][([].*?[)\]]|.)*?)\1?\1\1/g,s=/([*_])((?:\[.*?\][([].*?[)\]]|.)*?)\1/g,c=/\[([^\]]*)\] ?\[([^\]]*)\]/g;function o(e,n,t){let r;for(;null!==(r=e.exec(n));)t(r)}function u(e){const n=[];return o(c,e,e=>{const t=e[1],r=e[2],s=e.index;t&&r&&null!=s&&n.push({type:"reference-link",innerText:t,reference:r,startIndex:s,endIndex:s+e[0].length,offset:1})}),o(r,e,e=>{const t=f(e,"strong");t&&n.push(t)}),o(s,e,e=>{const t=f(e,"emphasis");t&&n.push(t)}),n.sort((e,n)=>e.startIndex-n.startIndex),function e(n,t){if(!t.length)return[n];const r=t[0].startIndex,s=r>0?[n.slice(0,r)]:[];for(;t.length;){const r=t.shift(),c=r.startIndex+r.offset,o=[];for(let e=0;e<t.length;){const n=t[e];n.endIndex>r.endIndex?e++:(t.splice(e,1),n.startIndex-=c,n.endIndex-=c,o.push(n))}const u=e(r.innerText,o);s.push("reference-link"===r.type?{type:r.type,content:u,reference:r.reference}:{type:r.type,content:u});const f=t.length?n.slice(r.endIndex,t[0].startIndex):n.slice(r.endIndex);f&&s.push(f)}return s}(e,n)}function f(e,n){const t=e.index,r=e[2];if(null==t||!r)return;const s=e[0],c=s.indexOf(r);return{type:n,startIndex:t,endIndex:t+s.length,innerText:r,offset:c}}exports.Marksome=function({text:e,references:r,...s}){const c=n.useMemo(()=>u(e),[e]);return t.createElement("span",Object.assign({},s),function e(n,r){return n.map((n,s)=>{if("string"==typeof n)return n;switch(n.type){case"strong":return t.createElement("strong",{key:s},e(n.content,r));case"emphasis":return t.createElement("em",{key:s},e(n.content,r));case"reference-link":{const c=null==r?void 0:r[n.reference],o=e(n.content,r);return c?"string"==typeof c?t.createElement("a",{key:s,href:c},o):c(s,o):t.createElement("span",{key:s},o)}default:return null}})}(c,r))},exports.parseSegments=u;
//# sourceMappingURL=react-marksome.cjs.production.min.js.map
import React, { useMemo } from 'react';
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
const STRONG_TEXT_REGEXP = /([*_])\1\1?((?:\[.*?\][([].*?[)\]]|.)*?)\1?\1\1/g;
const EMPHASIZED_TEXT_REGEXP = /([*_])((?:\[.*?\][([].*?[)\]]|.)*?)\1/g;
const REFERENCE_LINK_TEXT_REGEXP = /\[([^\]]*)\] ?\[([^\]]*)\]/g;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
function matchAll(regexp, text, onMatch) {
let match;
while ((match = regexp.exec(text)) !== null) {
onMatch(match);
}
return target;
}
var STRONG_TEXT_REGEXP = /([*_])\1\1?((?:\[.*?\][([].*?[)\]]|.)*?)\1?\1\1/g;
var EMPHASIZED_TEXT_REGEXP = /([*_])((?:\[.*?\][([].*?[)\]]|.)*?)\1/g;
var REFERENCE_LINK_TEXT_REGEXP = /\[([^\]]*)\] ?\[([^\]]*)\]/g;
function parseSegments(text) {
var matches = [];
Array.from(text.matchAll(REFERENCE_LINK_TEXT_REGEXP)).forEach(function (referenceLinkRegExpMatch) {
var innerText = referenceLinkRegExpMatch[1];
var reference = referenceLinkRegExpMatch[2];
var startIndex = referenceLinkRegExpMatch.index;
const matches = [];
matchAll(REFERENCE_LINK_TEXT_REGEXP, text, referenceLinkRegExpMatch => {
const innerText = referenceLinkRegExpMatch[1];
const reference = referenceLinkRegExpMatch[2];
const startIndex = referenceLinkRegExpMatch.index;

@@ -32,14 +26,14 @@ if (!innerText || !reference || startIndex == null) {

var endIndex = startIndex + referenceLinkRegExpMatch[0].length;
const endIndex = startIndex + referenceLinkRegExpMatch[0].length;
matches.push({
type: 'reference-link',
innerText: innerText,
reference: reference,
startIndex: startIndex,
endIndex: endIndex,
innerText,
reference,
startIndex,
endIndex,
offset: 1
});
});
Array.from(text.matchAll(STRONG_TEXT_REGEXP)).forEach(function (strongRegExpMatch) {
var inlineMatch = getInlineMatchFromRegexpMatch(strongRegExpMatch, 'strong');
matchAll(STRONG_TEXT_REGEXP, text, strongRegExpMatch => {
const inlineMatch = getInlineMatchFromRegexpMatch(strongRegExpMatch, 'strong');

@@ -50,4 +44,4 @@ if (inlineMatch) {

});
Array.from(text.matchAll(EMPHASIZED_TEXT_REGEXP)).forEach(function (emphasisRegExpMatch) {
var inlineMatch = getInlineMatchFromRegexpMatch(emphasisRegExpMatch, 'emphasis');
matchAll(EMPHASIZED_TEXT_REGEXP, text, emphasisRegExpMatch => {
const inlineMatch = getInlineMatchFromRegexpMatch(emphasisRegExpMatch, 'emphasis');

@@ -58,5 +52,3 @@ if (inlineMatch) {

});
matches.sort(function (a, b) {
return a.startIndex - b.startIndex;
});
matches.sort((a, b) => a.startIndex - b.startIndex);
return getSegmentsFromMatches(text, matches);

@@ -66,4 +58,4 @@ }

function getInlineMatchFromRegexpMatch(regexpMatch, inlineType) {
var startIndex = regexpMatch.index;
var innerText = regexpMatch[2];
const startIndex = regexpMatch.index;
const innerText = regexpMatch[2];

@@ -74,11 +66,11 @@ if (startIndex == null || !innerText) {

var decoratedText = regexpMatch[0];
var offset = decoratedText.indexOf(innerText);
var endIndex = startIndex + decoratedText.length;
const decoratedText = regexpMatch[0];
const offset = decoratedText.indexOf(innerText);
const endIndex = startIndex + decoratedText.length;
return {
type: inlineType,
startIndex: startIndex,
endIndex: endIndex,
innerText: innerText,
offset: offset
startIndex,
endIndex,
innerText,
offset
};

@@ -92,12 +84,12 @@ }

var firstMatchStartIndex = matches[0].startIndex;
var segments = firstMatchStartIndex > 0 ? [text.slice(0, firstMatchStartIndex)] : [];
const firstMatchStartIndex = matches[0].startIndex;
const segments = firstMatchStartIndex > 0 ? [text.slice(0, firstMatchStartIndex)] : [];
while (matches.length) {
var currentMatch = matches.shift();
var currentMatchTextStart = currentMatch.startIndex + currentMatch.offset;
var innerMatches = [];
const currentMatch = matches.shift();
const currentMatchTextStart = currentMatch.startIndex + currentMatch.offset;
const innerMatches = [];
for (var i = 0; i < matches.length;) {
var otherMatch = matches[i]; // if not an inner match, continue to the next
for (let i = 0; i < matches.length;) {
const otherMatch = matches[i]; // if not an inner match, continue to the next

@@ -116,3 +108,3 @@ if (otherMatch.endIndex > currentMatch.endIndex) {

var content = getSegmentsFromMatches(currentMatch.innerText, innerMatches);
const content = getSegmentsFromMatches(currentMatch.innerText, innerMatches);

@@ -122,3 +114,3 @@ if (currentMatch.type === 'reference-link') {

type: currentMatch.type,
content: content,
content,
reference: currentMatch.reference

@@ -129,7 +121,7 @@ });

type: currentMatch.type,
content: content
content
});
}
var textAfterLastMatch = matches.length ? text.slice(currentMatch.endIndex, matches[0].startIndex) : text.slice(currentMatch.endIndex);
const textAfterLastMatch = matches.length ? text.slice(currentMatch.endIndex, matches[0].startIndex) : text.slice(currentMatch.endIndex);

@@ -144,8 +136,8 @@ if (textAfterLastMatch) {

function Marksome(_ref) {
var text = _ref.text,
references = _ref.references,
spanProps = _objectWithoutPropertiesLoose(_ref, ["text", "references"]);
var segments = useMemo(function () {
function Marksome({
text,
references,
...spanProps
}) {
const segments = useMemo(() => {
return parseSegments(text);

@@ -157,3 +149,3 @@ }, [text]);

function renderSegments(segments, references) {
return segments.map(function (segment, segmentIndex) {
return segments.map((segment, segmentIndex) => {
if (typeof segment === 'string') {

@@ -176,4 +168,4 @@ return segment;

{
var referenceValue = references == null ? void 0 : references[segment.reference];
var children = renderSegments(segment.content, references);
const referenceValue = references == null ? void 0 : references[segment.reference];
const children = renderSegments(segment.content, references);

@@ -180,0 +172,0 @@ if (!referenceValue) {

{
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",

@@ -17,6 +17,6 @@ "repository": "github:miguel-silva/react-marksome",

"start": "tsdx watch",
"build": "tsdx build",
"build": "CHECK_POLYFILLS=true tsdx build",
"test": "tsdx test",
"lint": "tsdx lint src test stories",
"prepare": "tsdx build",
"prepare": "npm run build",
"size": "size-limit",

@@ -35,2 +35,3 @@ "analyze": "size-limit --why",

},
"browserslist": ">0.25% or last 2 major versions and supports es6-module",
"prettier": {

@@ -66,2 +67,3 @@ "singleQuote": true,

"babel-loader": "^8.2.2",
"babel-plugin-polyfill-corejs3": "^0.1.0",
"husky": "^4.3.8",

@@ -76,3 +78,4 @@ "react": "^17.0.1",

"typescript": "^4.1.3"
}
},
"dependencies": {}
}
# react-marksome
[![npm](https://img.shields.io/npm/v/react-marksome)](https://www.npmjs.com/package/react-marksome) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-marksome)](https://bundlephobia.com/result?p=react-marksome)
Parses some markdown, builds a tree of segments and renders them in React.

@@ -11,2 +13,10 @@

Install:
```sh
npm i react-markdown
```
Import and render the Marksome component:
```tsx

@@ -32,3 +42,3 @@ import { Marksome } from 'react-marksome';

For more examples, see the [stories](./stories/Marksome.stories.tsx).
For more examples, see the [stories](./stories/Marksome.stories.tsx) together with related [fixtures](./test/fixtures.ts).

@@ -105,2 +115,38 @@ ## API

## Supported browsers
The following [browserslist](https://github.com/browserslist/browserslist) is supported without the need of any polyfills:
<details>
<summary>>0.25% or last 2 major versions and supports es6-module</summary>
<p><strong>caniuse-lite db date: 15/02/2020</strong></p>
<ul>
<li>and_chr 87</li>
<li>and_ff 83</li>
<li>and_qq 10.4</li>
<li>android 81</li>
<li>chrome 87</li>
<li>chrome 86</li>
<li>chrome 85</li>
<li>edge 87</li>
<li>edge 86</li>
<li>firefox 84</li>
<li>firefox 83</li>
<li>ios_saf 14.0-14.3</li>
<li>ios_saf 13.4-13.7</li>
<li>ios_saf 13.3</li>
<li>ios_saf 13.2</li>
<li>ios_saf 13.0-13.1</li>
<li>ios_saf 12.2-12.4</li>
<li>opera 72</li>
<li>opera 71</li>
<li>safari 14</li>
<li>safari 13.1</li>
<li>safari 13</li>
<li>samsung 13.0</li>
<li>samsung 12.0</li>
</ul>
</details>
## Alternatives

@@ -107,0 +153,0 @@

@@ -39,29 +39,38 @@ export type Segment = InlineStyleSegment | ReferenceLinkSegment | string;

function matchAll(
regexp: RegExp,
text: string,
onMatch: (match: RegExpExecArray) => void,
) {
let match: RegExpExecArray | null;
while ((match = regexp.exec(text)) !== null) {
onMatch(match);
}
}
export function parseSegments(text: string): Segment[] {
const matches: Match[] = [];
Array.from(text.matchAll(REFERENCE_LINK_TEXT_REGEXP)).forEach(
(referenceLinkRegExpMatch) => {
const innerText = referenceLinkRegExpMatch[1];
const reference = referenceLinkRegExpMatch[2];
const startIndex = referenceLinkRegExpMatch.index;
matchAll(REFERENCE_LINK_TEXT_REGEXP, text, (referenceLinkRegExpMatch) => {
const innerText = referenceLinkRegExpMatch[1];
const reference = referenceLinkRegExpMatch[2];
const startIndex = referenceLinkRegExpMatch.index;
if (!innerText || !reference || startIndex == null) {
return;
}
if (!innerText || !reference || startIndex == null) {
return;
}
const endIndex = startIndex + referenceLinkRegExpMatch[0].length;
const endIndex = startIndex + referenceLinkRegExpMatch[0].length;
matches.push({
type: 'reference-link',
innerText,
reference,
startIndex,
endIndex,
offset: 1,
});
},
);
matches.push({
type: 'reference-link',
innerText,
reference,
startIndex,
endIndex,
offset: 1,
});
});
Array.from(text.matchAll(STRONG_TEXT_REGEXP)).forEach((strongRegExpMatch) => {
matchAll(STRONG_TEXT_REGEXP, text, (strongRegExpMatch) => {
const inlineMatch = getInlineMatchFromRegexpMatch(

@@ -77,14 +86,12 @@ strongRegExpMatch,

Array.from(text.matchAll(EMPHASIZED_TEXT_REGEXP)).forEach(
(emphasisRegExpMatch) => {
const inlineMatch = getInlineMatchFromRegexpMatch(
emphasisRegExpMatch,
'emphasis',
);
matchAll(EMPHASIZED_TEXT_REGEXP, text, (emphasisRegExpMatch) => {
const inlineMatch = getInlineMatchFromRegexpMatch(
emphasisRegExpMatch,
'emphasis',
);
if (inlineMatch) {
matches.push(inlineMatch);
}
},
);
if (inlineMatch) {
matches.push(inlineMatch);
}
});

@@ -91,0 +98,0 @@ matches.sort((a, b) => a.startIndex - b.startIndex);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc