Socket
Socket
Sign inDemoInstall

@tryghost/kg-parser-plugins

Package Overview
Dependencies
Maintainers
11
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.3.0

cjs/parser-plugins.js

26

lib/parser-plugins.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc