Socket
Socket
Sign inDemoInstall

@tryghost/kg-mobiledoc-html-renderer

Package Overview
Dependencies
8
Maintainers
15
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0 to 5.1.0

29

lib/mobiledoc-html-renderer.js

@@ -120,2 +120,31 @@ const SimpleDom = require('simple-dom');

// avoid a HR as the first or last element in a post when emailing
if (cardOptions.target === 'email') {
const hrFirstChild = rendered.result.firstChild;
if (hrFirstChild && hrFirstChild.tagName === 'HR') {
rendered.result.removeChild(hrFirstChild);
}
if (hrFirstChild && hrFirstChild.tagName === 'DIV') {
const divFirstChild = hrFirstChild.firstChild;
if (divFirstChild && divFirstChild.tagName === 'HR') {
hrFirstChild.removeChild(divFirstChild);
}
}
const hrLastChild = rendered.result.lastChild;
if (hrLastChild && hrLastChild.tagName === 'HR') {
rendered.result.removeChild(hrLastChild);
}
if (hrLastChild && hrLastChild.tagName === 'DIV') {
const divLastChild = hrLastChild.lastChild;
if (divLastChild && divLastChild.tagName === 'HR') {
hrLastChild.removeChild(divLastChild);
}
}
}
// Walk the DOM output and modify nodes as needed

@@ -122,0 +151,0 @@ // eg. to add ID attributes to heading elements

4

package.json
{
"name": "@tryghost/kg-mobiledoc-html-renderer",
"version": "5.0.0",
"version": "5.1.0",
"repository": "https://github.com/TryGhost/Koenig/tree/master/packages/kg-mobiledoc-html-renderer",

@@ -29,3 +29,3 @@ "author": "Ghost Foundation",

},
"gitHead": "8f888e8f270c466ddafbfbc0b9e36e4b6391e5a7"
"gitHead": "cc742b332f1a02e7d4fbbfe520ff47714151bd24"
}
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