markdown-magic 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -150,6 +150,7 @@ async function processContents(text, config) {
150
150
  // console.log('config', config)
151
151
 
152
152
  // console.log('returnedContent', returnedContent)
153
+ // process.exit(1)
153
154
 
154
155
  if (returnedContent) {
155
156
  tempContent = returnedContent
@@ -166,6 +167,10 @@ async function processContents(text, config) {
166
167
  }
167
168
  }
168
169
  }, md, afterMiddleware)
170
+ /*
171
+ console.log('afterContent', afterContent)
172
+ process.exit(1)
173
+ /** */
169
174
 
170
175
  if (debug) {
171
176
  console.log('afterContent', afterContent)
@@ -181,7 +186,11 @@ async function processContents(text, config) {
181
186
  // console.log('formattedNewContent', formattedNewContent)
182
187
  /* Remove any conflicting imported comments */
183
188
  const fix = removeConflictingComments(formattedNewContent, COMMENT_OPEN_REGEX, COMMENT_CLOSE_REGEX)
184
- // console.log('fix', fix)
189
+ /*
190
+ console.log('fix')
191
+ deepLog(fix)
192
+ process.exit(1)
193
+ /** */
185
194
  if (options.removeComments) {
186
195
  // console.log('removeComments', options.removeComments)
187
196
  }
@@ -194,10 +203,19 @@ async function processContents(text, config) {
194
203
  const indent = indentString(fix, preserveIndent)
195
204
  const newCont = `${openTag}${indent}${closeTag}`
196
205
  /* Replace original contents */
197
- const newContents = md.replace(block.value, newCont)
206
+ // Must use replacer function because strings get coearced to regex or something
207
+ const newContents = md.replace(block.value, () => newCont)
208
+ /*
209
+ deepLog(newContents)
210
+ process.exit(1)
211
+ /** */
198
212
  return Promise.resolve(newContents)
199
213
  }, Promise.resolve(text))
200
214
 
215
+ // console.log('updatedContents')
216
+ // deepLog(updatedContents)
217
+ // process.exit(1)
218
+
201
219
  // if (debug) {
202
220
  // console.log('Output Markdown')
203
221
  // console.log(updatedContents)
@@ -245,8 +263,11 @@ async function processContents(text, config) {
245
263
  originalContents: text,
246
264
  updatedContents,
247
265
  }
248
- // console.log('result')
249
- // deepLog(result)
266
+ /*
267
+ console.log('result')
268
+ deepLog(result)
269
+ process.exit(1)
270
+ /** */
250
271
  return result
251
272
  }
252
273
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown-magic",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "Automatically update markdown files with content from external sources",
5
5
  "main": "lib/index.js",
6
6
  "bin": {