@orchitech/turndown
Advanced tools
Comparing version 6.0.1-orchi.1 to 6.0.1-orchi.2
@@ -286,4 +286,7 @@ var TurndownService = (function () { | ||
replacement: function (content) { | ||
if (!content.trim()) return '' | ||
replacement: function (content, node, options) { | ||
if (options.preformattedCode) { | ||
content = content.replace(/^\n+|\n+$/g, '').replace(/\n/, ' '); | ||
} | ||
if (options.preformattedCode ? !content : !content.trim()) return '' | ||
@@ -290,0 +293,0 @@ var delimiter = '`'; |
@@ -285,4 +285,7 @@ 'use strict'; | ||
replacement: function (content) { | ||
if (!content.trim()) return '' | ||
replacement: function (content, node, options) { | ||
if (options.preformattedCode) { | ||
content = content.replace(/^\n+|\n+$/g, '').replace(/\n/, ' '); | ||
} | ||
if (options.preformattedCode ? !content : !content.trim()) return '' | ||
@@ -289,0 +292,0 @@ var delimiter = '`'; |
@@ -283,4 +283,7 @@ function extend (destination) { | ||
replacement: function (content) { | ||
if (!content.trim()) return '' | ||
replacement: function (content, node, options) { | ||
if (options.preformattedCode) { | ||
content = content.replace(/^\n+|\n+$/g, '').replace(/\n/, ' '); | ||
} | ||
if (options.preformattedCode ? !content : !content.trim()) return '' | ||
@@ -287,0 +290,0 @@ var delimiter = '`'; |
@@ -289,4 +289,7 @@ (function (global, factory) { | ||
replacement: function (content) { | ||
if (!content.trim()) return '' | ||
replacement: function (content, node, options) { | ||
if (options.preformattedCode) { | ||
content = content.replace(/^\n+|\n+$/g, '').replace(/\n/, ' '); | ||
} | ||
if (options.preformattedCode ? !content : !content.trim()) return '' | ||
@@ -293,0 +296,0 @@ var delimiter = '`'; |
@@ -285,4 +285,7 @@ 'use strict'; | ||
replacement: function (content) { | ||
if (!content.trim()) return '' | ||
replacement: function (content, node, options) { | ||
if (options.preformattedCode) { | ||
content = content.replace(/^\n+|\n+$/g, '').replace(/\n/, ' '); | ||
} | ||
if (options.preformattedCode ? !content : !content.trim()) return '' | ||
@@ -289,0 +292,0 @@ var delimiter = '`'; |
@@ -283,4 +283,7 @@ function extend (destination) { | ||
replacement: function (content) { | ||
if (!content.trim()) return '' | ||
replacement: function (content, node, options) { | ||
if (options.preformattedCode) { | ||
content = content.replace(/^\n+|\n+$/g, '').replace(/\n/, ' '); | ||
} | ||
if (options.preformattedCode ? !content : !content.trim()) return '' | ||
@@ -287,0 +290,0 @@ var delimiter = '`'; |
@@ -289,4 +289,7 @@ (function (global, factory) { | ||
replacement: function (content) { | ||
if (!content.trim()) return '' | ||
replacement: function (content, node, options) { | ||
if (options.preformattedCode) { | ||
content = content.replace(/^\n+|\n+$/g, '').replace(/\n/, ' '); | ||
} | ||
if (options.preformattedCode ? !content : !content.trim()) return '' | ||
@@ -293,0 +296,0 @@ var delimiter = '`'; |
{ | ||
"name": "@orchitech/turndown", | ||
"description": "A library that converts HTML to Markdown", | ||
"version": "6.0.1-orchi.1", | ||
"version": "6.0.1-orchi.2", | ||
"author": "Dom Christie + patches by Orchitech", | ||
@@ -6,0 +6,0 @@ "main": "lib/turndown.cjs.js", |
184390
5450