comment-block-transformer 0.5.3 → 0.5.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.
- package/CHANGELOG.md +35 -0
- package/package.json +3 -3
- package/src/index.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.5.7](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.5.6...comment-block-transformer@0.5.7) (2026-01-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package comment-block-transformer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.5.6](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.5.5...comment-block-transformer@0.5.6) (2026-01-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* enable pattern mode for custom open tags ([904d4dc](https://github.com/DavidWells/markdown-magic/commit/904d4dc391a36848d5bb142d54835423df0b9d05))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [0.5.5](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.5.4...comment-block-transformer@0.5.5) (2026-01-19)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package comment-block-transformer
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.5.4](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.5.3...comment-block-transformer@0.5.4) (2026-01-19)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package comment-block-transformer
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [0.5.3](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.5.2...comment-block-transformer@0.5.3) (2026-01-11)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package comment-block-transformer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comment-block-transformer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"description": "Transform markdown blocks based on configured transforms",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"release:major": "pnpm run build && pnpm version major && pnpm publish"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"comment-block-parser": "1.5.
|
|
18
|
+
"comment-block-parser": "1.5.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^22.0.0",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "2bef6eae03b732f55673524c1e928ecff8b2c86c"
|
|
29
29
|
}
|
package/src/index.js
CHANGED
|
@@ -98,7 +98,6 @@ async function blockTransformer(inputText, config) {
|
|
|
98
98
|
srcPath,
|
|
99
99
|
outputPath,
|
|
100
100
|
open = OPEN_WORD,
|
|
101
|
-
close = CLOSE_WORD,
|
|
102
101
|
syntax = SYNTAX,
|
|
103
102
|
transforms = {},
|
|
104
103
|
beforeMiddleware = [],
|
|
@@ -106,6 +105,8 @@ async function blockTransformer(inputText, config) {
|
|
|
106
105
|
removeComments = false,
|
|
107
106
|
customPatterns
|
|
108
107
|
} = opts
|
|
108
|
+
// Don't default close - let undefined pass through to enable pattern mode in block-parser
|
|
109
|
+
const close = opts.close !== undefined ? opts.close : (opts.open ? undefined : CLOSE_WORD)
|
|
109
110
|
|
|
110
111
|
let foundBlocks = {}
|
|
111
112
|
try {
|
|
@@ -307,6 +308,7 @@ async function blockTransformer(inputText, config) {
|
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
310
|
|
|
311
|
+
|
|
310
312
|
/** @typedef {BlockData & { sourceLocation?: string, transform?: string }} BlockDataExtended */
|
|
311
313
|
|
|
312
314
|
function getDetails({
|