New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@github/paste-markdown

Package Overview
Dependencies
Maintainers
19
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/paste-markdown - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

11

dist/index.esm.js

@@ -88,3 +88,3 @@ function insertText(textarea, text) {

const doc = parser.parseFromString(textHTMLClean, 'text/html');
const walker = doc.createTreeWalker(doc.body, NodeFilter.SHOW_ELEMENT);
const walker = doc.createTreeWalker(doc.body, NodeFilter.SHOW_ELEMENT, node => node.parentNode && isLink(node.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT);
const markdown = convertToMarkdown(plaintext, walker);

@@ -106,3 +106,5 @@ if (markdown === plaintext)

index++;
const text = isLink(currentNode) ? currentNode.textContent || '' : ((_a = currentNode.firstChild) === null || _a === void 0 ? void 0 : _a.wholeText) || '';
const text = isLink(currentNode)
? (currentNode.textContent || '').replace(/[\t\n\r ]+/g, ' ')
: ((_a = currentNode.firstChild) === null || _a === void 0 ? void 0 : _a.wholeText) || '';
if (isEmptyString(text)) {

@@ -115,3 +117,3 @@ currentNode = walker.nextNode();

if (isLink(currentNode)) {
const markdownLink = linkify$2(currentNode);
const markdownLink = linkify$2(currentNode, text);
markdown =

@@ -139,4 +141,3 @@ markdown.slice(0, markdownFoundIndex) + markdownLink + markdown.slice(markdownFoundIndex + text.length);

}
function linkify$2(element) {
const label = element.textContent || '';
function linkify$2(element, label) {
const url = element.href || '';

@@ -143,0 +144,0 @@ let markdown = '';

@@ -94,3 +94,3 @@ (function (global, factory) {

const doc = parser.parseFromString(textHTMLClean, 'text/html');
const walker = doc.createTreeWalker(doc.body, NodeFilter.SHOW_ELEMENT);
const walker = doc.createTreeWalker(doc.body, NodeFilter.SHOW_ELEMENT, node => node.parentNode && isLink(node.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT);
const markdown = convertToMarkdown(plaintext, walker);

@@ -112,3 +112,5 @@ if (markdown === plaintext)

index++;
const text = isLink(currentNode) ? currentNode.textContent || '' : ((_a = currentNode.firstChild) === null || _a === void 0 ? void 0 : _a.wholeText) || '';
const text = isLink(currentNode)
? (currentNode.textContent || '').replace(/[\t\n\r ]+/g, ' ')
: ((_a = currentNode.firstChild) === null || _a === void 0 ? void 0 : _a.wholeText) || '';
if (isEmptyString(text)) {

@@ -121,3 +123,3 @@ currentNode = walker.nextNode();

if (isLink(currentNode)) {
const markdownLink = linkify$2(currentNode);
const markdownLink = linkify$2(currentNode, text);
markdown =

@@ -145,4 +147,3 @@ markdown.slice(0, markdownFoundIndex) + markdownLink + markdown.slice(markdownFoundIndex + text.length);

}
function linkify$2(element) {
const label = element.textContent || '';
function linkify$2(element, label) {
const url = element.href || '';

@@ -149,0 +150,0 @@ let markdown = '';

{
"name": "@github/paste-markdown",
"version": "1.3.0",
"version": "1.3.1",
"description": "Paste spreadsheet cells as a Markdown table.",

@@ -5,0 +5,0 @@ "repository": "github/paste-markdown",

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