turndown
Advanced tools
Comparing version 7.1.1 to 7.1.2
@@ -692,3 +692,3 @@ var TurndownService = (function () { | ||
function edgeWhitespace (string) { | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); | ||
return { | ||
@@ -695,0 +695,0 @@ leading: m[1], // whole string for whitespace-only strings |
@@ -691,3 +691,3 @@ 'use strict'; | ||
function edgeWhitespace (string) { | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); | ||
return { | ||
@@ -694,0 +694,0 @@ leading: m[1], // whole string for whitespace-only strings |
@@ -689,3 +689,3 @@ function extend (destination) { | ||
function edgeWhitespace (string) { | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); | ||
return { | ||
@@ -692,0 +692,0 @@ leading: m[1], // whole string for whitespace-only strings |
@@ -695,3 +695,3 @@ (function (global, factory) { | ||
function edgeWhitespace (string) { | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); | ||
return { | ||
@@ -698,0 +698,0 @@ leading: m[1], // whole string for whitespace-only strings |
@@ -667,3 +667,3 @@ 'use strict'; | ||
function edgeWhitespace (string) { | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); | ||
return { | ||
@@ -670,0 +670,0 @@ leading: m[1], // whole string for whitespace-only strings |
@@ -665,3 +665,3 @@ function extend (destination) { | ||
function edgeWhitespace (string) { | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); | ||
return { | ||
@@ -668,0 +668,0 @@ leading: m[1], // whole string for whitespace-only strings |
@@ -671,3 +671,3 @@ (function (global, factory) { | ||
function edgeWhitespace (string) { | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); | ||
var m = string.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); | ||
return { | ||
@@ -674,0 +674,0 @@ leading: m[1], // whole string for whitespace-only strings |
{ | ||
"name": "turndown", | ||
"description": "A library that converts HTML to Markdown", | ||
"version": "7.1.1", | ||
"version": "7.1.2", | ||
"author": "Dom Christie", | ||
@@ -23,2 +23,3 @@ "main": "lib/turndown.cjs.js", | ||
"browserify": "17.0.0", | ||
"rewire": "^6.0.0", | ||
"rollup": "2.52.3", | ||
@@ -40,3 +41,3 @@ "standard": "^10.0.3", | ||
"type": "git", | ||
"url": "https://github.com/domchristie/turndown.git" | ||
"url": "https://github.com/mixmark-io/turndown.git" | ||
}, | ||
@@ -51,4 +52,4 @@ "scripts": { | ||
"prepare": "npm run build", | ||
"test": "npm run build && npm run build-test && standard ./src/**/*.js && node test/turndown-test.js" | ||
"test": "npm run build && npm run build-test && standard ./src/**/*.js && node test/internals-test.js && node test/turndown-test.js" | ||
} | ||
} |
@@ -165,2 +165,4 @@ # Turndown | ||
The tag names in the `filter` property are expected in lowercase, regardless of their form in the document. | ||
Alternatively, the filter can be a function that returns a boolean depending on whether a given node should be replaced. The function is passed a DOM node as well as the `TurndownService` options. For example, the following rule selects `<a>` elements (with an `href`) when the `linkStyle` option is `inlined`: | ||
@@ -167,0 +169,0 @@ |
191107
235
8