@tryghost/kg-parser-plugins
Advanced tools
Comparing version 0.2.2 to 0.3.0
@@ -14,3 +14,3 @@ /** | ||
// mobiledoc by default ignores <BR> tags but we have a custom SoftReturn atom | ||
const brToSoftBreakAtom = (node, builder, {addMarkerable, nodeFinished}) => { | ||
function brToSoftBreakAtom(node, builder, {addMarkerable, nodeFinished}) { | ||
if (node.nodeType !== 1 || node.tagName !== 'BR') { | ||
@@ -24,3 +24,3 @@ return; | ||
nodeFinished(); | ||
}; | ||
} | ||
@@ -30,3 +30,3 @@ // leading newlines in text nodes will add a space to the beginning of the text | ||
// after parsing text as markdown to html | ||
const removeLeadingNewline = (node) => { | ||
function removeLeadingNewline(node) { | ||
if (node.nodeType !== 3 || node.nodeName !== '#text') { | ||
@@ -37,5 +37,5 @@ return; | ||
node.nodeValue = node.nodeValue.replace(/^\n/, ''); | ||
}; | ||
} | ||
const figureToImageCard = (node, builder, {addSection, nodeFinished}) => { | ||
function figureToImageCard(node, builder, {addSection, nodeFinished}) { | ||
if (node.nodeType !== 1 || node.tagName !== 'FIGURE') { | ||
@@ -76,5 +76,5 @@ return; | ||
nodeFinished(); | ||
}; | ||
} | ||
const imgToCard = (node, builder, {addSection, nodeFinished}) => { | ||
function imgToCard(node, builder, {addSection, nodeFinished}) { | ||
if (node.nodeType !== 1 || node.tagName !== 'IMG') { | ||
@@ -93,5 +93,5 @@ return; | ||
nodeFinished(); | ||
}; | ||
} | ||
const hrToCard = (node, builder, {addSection, nodeFinished}) => { | ||
function hrToCard(node, builder, {addSection, nodeFinished}) { | ||
if (node.nodeType !== 1 || node.tagName !== 'HR') { | ||
@@ -104,5 +104,5 @@ return; | ||
nodeFinished(); | ||
}; | ||
} | ||
const preCodeToCard = (node, builder, {addSection, nodeFinished}) => { | ||
function preCodeToCard(node, builder, {addSection, nodeFinished}) { | ||
if (node.nodeType !== 1 || node.tagName !== 'PRE') { | ||
@@ -120,5 +120,5 @@ return; | ||
} | ||
}; | ||
} | ||
module.exports = [ | ||
export default [ | ||
brToSoftBreakAtom, | ||
@@ -125,0 +125,0 @@ removeLeadingNewline, |
{ | ||
"name": "@tryghost/kg-parser-plugins", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"repository": "https://github.com/TryGhost/Ghost-SDK/tree/master/packages/kg-parser-plugins", | ||
"author": "Ghost Foundation", | ||
"license": "MIT", | ||
"main": "lib/parser-plugins.js", | ||
"main": "cjs/parser-plugins.js", | ||
"module": "es/parser-plugins.js", | ||
"source": "lib/parser-plugins.js", | ||
"files": [ | ||
"LICENSE", | ||
"README.md", | ||
"cjs/", | ||
"es/", | ||
"lib/" | ||
], | ||
"scripts": { | ||
"dev": "echo \"Implement me!\"", | ||
"build": "rollup -c", | ||
"prepare": "NODE_ENV=production yarn build", | ||
"pretest": "yarn build", | ||
"test": "NODE_ENV=testing mocha './test/**/*.test.js'", | ||
@@ -14,5 +26,2 @@ "lint": "eslint . --ext .js --cache", | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"publishConfig": { | ||
@@ -22,7 +31,11 @@ "access": "public" | ||
"devDependencies": { | ||
"@babel/core": "7.4.4", | ||
"@babel/preset-env": "7.4.4", | ||
"mocha": "5.2.0", | ||
"rollup": "1.10.1", | ||
"rollup-plugin-babel": "4.3.2", | ||
"should": "13.2.3", | ||
"sinon": "6.3.5" | ||
}, | ||
"gitHead": "6065ae9973d8bfea601584ffc0c9f5c130ecc4ae" | ||
"gitHead": "2d7cb5a6473209823964068740b1e3d334f5cfa0" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
20061
7
313
7
2