@tryghost/kg-mobiledoc-html-renderer
Advanced tools
Comparing version 5.2.0 to 5.3.0
@@ -101,2 +101,3 @@ const SimpleDom = require('simple-dom'); | ||
const ghostVersion = mobiledoc.ghostVersion || '4.0'; | ||
const defaultCardOptions = { | ||
@@ -107,3 +108,15 @@ ghostVersion, | ||
const cardOptions = Object.assign({}, defaultCardOptions, _cardOptions); | ||
const rendererOptions = Object.assign({}, this.options, {cardOptions}); | ||
const sectionElementRenderer = { | ||
ASIDE: function (tagName, dom) { | ||
// we use ASIDE sections in Koenig as a workaround for applying | ||
// a different blockquote style because mobiledoc doesn't support | ||
// storing arbitrary attributes with sections | ||
const blockquote = dom.createElement('blockquote'); | ||
blockquote.setAttribute('class', 'kg-blockquote-alt kg-width-wide'); | ||
return blockquote; | ||
} | ||
}; | ||
const rendererOptions = Object.assign({}, this.options, {cardOptions, sectionElementRenderer}); | ||
const renderer = new Renderer(rendererOptions); | ||
@@ -110,0 +123,0 @@ const rendered = renderer.render(mobiledoc); |
{ | ||
"name": "@tryghost/kg-mobiledoc-html-renderer", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"repository": "https://github.com/TryGhost/Koenig/tree/master/packages/kg-mobiledoc-html-renderer", | ||
@@ -32,3 +32,3 @@ "author": "Ghost Foundation", | ||
}, | ||
"gitHead": "5fbc876127879babe588a577bc810038c98df5ef" | ||
"gitHead": "050de1323b4051a0424a69b6aba0c790f6e38aeb" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7297
123
0