Skip to content

Commit 4342964

Browse files
Account for trailing whitespace in function keyword check
1 parent d9e4390 commit 4342964

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ exports.defineTags = function (dictionary) {
165165

166166
// Replace TS inline function syntax with JSDoc
167167
functionIndices.reverse().forEach(([start, end]) => {
168-
if (tagText.slice(0, start).endsWith('function')) {
168+
if (tagText.slice(0, start).trim().endsWith('function')) {
169169
// Already JSDoc syntax
170170
return;
171171
}

0 commit comments

Comments
 (0)