markdown-magic 4.5.8 → 4.6.0

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown-magic",
3
- "version": "4.5.8",
3
+ "version": "4.6.0",
4
4
  "description": "Automatically update markdown files with content from external sources",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "2bef6eae03b732f55673524c1e928ecff8b2c86c"
73
+ "gitHead": "cbaa34e454c7c183afa23e5baf80aba663b8c2aa"
74
74
  }
package/src/index.js CHANGED
@@ -297,14 +297,22 @@ async function markdownMagic(globOrOpts = {}, options = {}) {
297
297
 
298
298
 
299
299
  // Pattern mode (close undefined) - parseBlocks handles regex generation
300
+ // Single comment mode (close === false) - no close tag
300
301
  // Standard mode - get patterns for comment stripping
301
302
  let patterns = {}
302
- if (close !== undefined) {
303
+ const singleCommentMode = close === false
304
+ if (close !== undefined && close !== false) {
303
305
  patterns = getBlockRegex({
304
306
  syntax,
305
307
  openText: open,
306
308
  closeText: close
307
309
  })
310
+ } else if (singleCommentMode) {
311
+ patterns = getBlockRegex({
312
+ syntax,
313
+ openText: open,
314
+ singleComment: true
315
+ })
308
316
  }
309
317
 
310
318
  if (debug) {