Skip to content

Commit 3d8ff29

Browse files
committed
defaultValue is implicitly code only with JSDoc compat
1 parent 028a141 commit 3d8ff29

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Added `--disableGit` option to prevent TypeDoc from using Git to try to determine if sources can be linked, #2326.
2020
- Added support for tags `@showGroups`, `@hideGroups`, `@showCategories`, `@hideCategories` to configure the navigation pane on a
2121
per-reflection basis, #2329.
22+
- With `--jsDocCompatibility.defaultTags` set, `@defaultValue` is now implicitly a code block if the text contains no code, #2370.
2223

2324
### Bug Fixes
2425

@@ -39,6 +40,7 @@
3940

4041
- @camc314
4142
- @cprussin
43+
- @roggervalf
4244
- @Th3S4mur41
4345

4446
## v0.24.8 (2023-06-04)

src/lib/converter/comments/parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ function blockTag(
216216
if (tagName === "@example" && config.jsDocCompatibility.exampleTag) {
217217
content = exampleBlockContent(comment, lexer, config, warning);
218218
} else if (
219-
(tagName === "@default" && config.jsDocCompatibility.defaultTag) ||
220-
tagName === "@defaultValue"
219+
["@default", "@defaultValue"].includes(tagName) &&
220+
config.jsDocCompatibility.defaultTag
221221
) {
222222
content = defaultBlockContent(comment, lexer, config, warning);
223223
} else {

0 commit comments

Comments
 (0)