markdown-magic
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -153,2 +153,3 @@ const { parseBlocks } = require('./block-parser') | ||
// console.log('returnedContent', returnedContent) | ||
// process.exit(1) | ||
@@ -170,2 +171,6 @@ if (returnedContent) { | ||
}, md, afterMiddleware) | ||
/* | ||
console.log('afterContent', afterContent) | ||
process.exit(1) | ||
/** */ | ||
@@ -186,3 +191,7 @@ if (debug) { | ||
const fix = removeConflictingComments(formattedNewContent, COMMENT_OPEN_REGEX, COMMENT_CLOSE_REGEX) | ||
// console.log('fix', fix) | ||
/* | ||
console.log('fix') | ||
deepLog(fix) | ||
process.exit(1) | ||
/** */ | ||
if (options.removeComments) { | ||
@@ -200,6 +209,15 @@ // console.log('removeComments', options.removeComments) | ||
/* Replace original contents */ | ||
const newContents = md.replace(block.value, newCont) | ||
// Must use replacer function because strings get coearced to regex or something | ||
const newContents = md.replace(block.value, () => newCont) | ||
/* | ||
deepLog(newContents) | ||
process.exit(1) | ||
/** */ | ||
return Promise.resolve(newContents) | ||
}, Promise.resolve(text)) | ||
// console.log('updatedContents') | ||
// deepLog(updatedContents) | ||
// process.exit(1) | ||
// if (debug) { | ||
@@ -252,4 +270,7 @@ // console.log('Output Markdown') | ||
} | ||
// console.log('result') | ||
// deepLog(result) | ||
/* | ||
console.log('result') | ||
deepLog(result) | ||
process.exit(1) | ||
/** */ | ||
return result | ||
@@ -256,0 +277,0 @@ } |
{ | ||
"name": "markdown-magic", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "Automatically update markdown files with content from external sources", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
179624
4706