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

@joplin/turndown-plugin-gfm

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@joplin/turndown-plugin-gfm - npm Package Compare versions

Comparing version 1.0.53 to 1.0.54

37

lib/turndown-plugin-gfm.cjs.js

@@ -216,16 +216,25 @@ 'use strict';

const tableShouldBeHtml = (tableNode) => {
const tableShouldBeHtml = (tableNode, preserveNestedTables) => {
const possibleTags = [
'UL',
'OL',
'H1',
'H2',
'H3',
'H4',
'H5',
'H6',
'HR',
'BLOCKQUOTE',
];
// In general we should leave as HTML tables that include other tables. The
// exception is with the Web Clipper when we import a web page with a layout
// that's made of HTML tables. In that case we have this logic of removing the
// outer table and keeping only the inner ones. For the Rich Text editor
// however we always want to keep nested tables.
if (preserveNestedTables) possibleTags.push('TABLE');
return nodeContains(tableNode, 'code') ||
nodeContains(tableNode, [
'UL',
'OL',
'H1',
'H2',
'H3',
'H4',
'H5',
'H6',
'HR',
'BLOCKQUOTE',
]);
nodeContains(tableNode, possibleTags);
};

@@ -283,3 +292,3 @@

turndownService.keep(function (node) {
if (node.nodeName === 'TABLE' && tableShouldBeHtml(node)) return true;
if (node.nodeName === 'TABLE' && tableShouldBeHtml(node, turndownService.options.preserveNestedTables)) return true;
return false;

@@ -286,0 +295,0 @@ });

@@ -7,3 +7,3 @@ {

},
"version": "1.0.53",
"version": "1.0.54",
"author": "Dom Christie",

@@ -45,3 +45,3 @@ "main": "lib/turndown-plugin-gfm.cjs.js",

},
"gitHead": "9ac03ec33a064da623d955f6ad590060a6e2a003"
"gitHead": "7c24a2f4bead520b5782cdc08635c104eedffa81"
}
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