comment-block-transformer 0.2.4 → 0.5.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.
- package/CHANGELOG.md +33 -0
- package/package.json +3 -3
- package/src/index.js +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.0](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.2.4...comment-block-transformer@0.5.0) (2026-01-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **block-parser:** add firstArgIsType option ([e7067a2](https://github.com/DavidWells/markdown-magic/commit/e7067a28504578ad4b77e7da19cafe107508c85d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [0.4.0](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.2.4...comment-block-transformer@0.4.0) (2026-01-09)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **block-parser:** add firstArgIsType option ([e7067a2](https://github.com/DavidWells/markdown-magic/commit/e7067a28504578ad4b77e7da19cafe107508c85d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [0.3.0](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.2.4...comment-block-transformer@0.3.0) (2026-01-09)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **block-parser:** add firstArgIsType option ([e7067a2](https://github.com/DavidWells/markdown-magic/commit/e7067a28504578ad4b77e7da19cafe107508c85d))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [0.2.4](https://github.com/DavidWells/markdown-magic/compare/comment-block-transformer@0.2.3...comment-block-transformer@0.2.4) (2026-01-08)
|
|
7
40
|
|
|
8
41
|
**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.
|
|
3
|
+
"version": "0.5.0",
|
|
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.
|
|
18
|
+
"comment-block-parser": "1.4.0"
|
|
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": "7329dd17e21dea4551f995fa85a5f843c08f9109"
|
|
29
29
|
}
|
package/src/index.js
CHANGED
|
@@ -113,7 +113,8 @@ async function blockTransformer(inputText, config) {
|
|
|
113
113
|
syntax,
|
|
114
114
|
open,
|
|
115
115
|
close,
|
|
116
|
-
customPatterns
|
|
116
|
+
customPatterns,
|
|
117
|
+
firstArgIsType: true,
|
|
117
118
|
})
|
|
118
119
|
} catch (e) {
|
|
119
120
|
const errMsg = (srcPath) ? `in ${srcPath}` : inputText
|
|
@@ -313,8 +314,10 @@ function getDetails({
|
|
|
313
314
|
openValue,
|
|
314
315
|
srcPath,
|
|
315
316
|
index,
|
|
316
|
-
opts
|
|
317
|
+
opts = {}
|
|
317
318
|
}) {
|
|
319
|
+
// @ts-ignore
|
|
320
|
+
opts.firstArgIsType = true
|
|
318
321
|
const blockData = parseBlocks(contents, opts)
|
|
319
322
|
const matchingBlocks = blockData.blocks.filter((block) => {
|
|
320
323
|
return block.open.value === openValue
|