@es-joy/jsdoccomment
Advanced tools
Comparing version 0.35.0 to 0.36.0
# CHANGES for `@es-joy/jsdoccomment` | ||
## 0.36.0 | ||
- feat: add `hasPreterminalTagDescription` property | ||
- fix: avoid description line properties if tag is present | ||
- fix: ensure description and description lines added to terminal multi-line tag | ||
## 0.35.0 | ||
- feat: add `hasPreterminalDescription` property | ||
- fix: allow newline even for 1st line (after 0th) | ||
- feat: add `hasPreterminalDescription` property | ||
@@ -8,0 +14,0 @@ ## 0.34.0 |
{ | ||
"name": "@es-joy/jsdoccomment", | ||
"version": "0.35.0", | ||
"version": "0.36.0", | ||
"author": "Brett Zamir <brettz9@yahoo.com>", | ||
@@ -5,0 +5,0 @@ "contributors": [], |
@@ -111,4 +111,6 @@ # @es-joy/jsdoccomment | ||
ends | ||
5. `hasPreterminalDescription` - Set to 0 or 1. On if has a description on the | ||
same line as the terminal `*/`. | ||
5. `hasPreterminalDescription` - Set to 0 or 1. On if has a block description | ||
on the same line as the terminal `*/`. | ||
6. `hasPreterminalTagDescription` - Set to 0 or 1. On if has a tag description | ||
on the same line as the terminal `*/`. | ||
@@ -115,0 +117,0 @@ May also have the following non-visitable properties from `comment-parser`: |
@@ -171,3 +171,3 @@ import {parse as jsdocTypePrattParse} from 'jsdoc-type-pratt-parser'; | ||
if (description && descLineStateOpen) { | ||
if (!tag && description && descLineStateOpen) { | ||
if (ast.descriptionStartLine === undefined) { | ||
@@ -196,5 +196,11 @@ ast.descriptionStartLine = idx; | ||
if (description) { | ||
ast.hasPreterminalDescription = 1; | ||
ast.description += (ast.description ? '\n' : '') + description; | ||
ast.descriptionLines.push({ | ||
if (lastTag) { | ||
ast.hasPreterminalTagDescription = 1; | ||
} else { | ||
ast.hasPreterminalDescription = 1; | ||
} | ||
const holder = lastTag || ast; | ||
holder.description += (holder.description ? '\n' : '') + description; | ||
holder.descriptionLines.push({ | ||
delimiter, | ||
@@ -317,2 +323,3 @@ description, | ||
ast.terminal = end; | ||
ast.hasPreterminalTagDescription = 1; | ||
@@ -319,0 +326,0 @@ cleanUpLastTag(lastTag); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71089
1584
221