Skip to content

Commit

Permalink
Account for trailing whitespace in function keyword check
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Knights committed Sep 7, 2024
1 parent 099fa98 commit ecd9cad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ exports.defineTags = function (dictionary) {

// Replace TS inline function syntax with JSDoc
functionIndices.reverse().forEach(([start, end]) => {
if (tagText.slice(0, start).endsWith('function')) {
if (tagText.slice(0, start).trim().endsWith('function')) {
// Already JSDoc syntax
return;
}
Expand Down

0 comments on commit ecd9cad

Please sign in to comment.