Skip to content

Commit 2e3c3cd

Browse files
committed
fix: Alignment fixer should use indentation character from sourceCode.
1 parent 9b36869 commit 2e3c3cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/iterateJsdoc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ const iterateAllJsdocs = (iterator, ruleConfig) => {
422422
return;
423423
}
424424

425-
const indent = ' '.repeat(comment.loc.start.column);
425+
const sourceLine = sourceCode.lines[comment.loc.start.line - 1];
426+
const indent = sourceLine.charAt(0).repeat(comment.loc.start.column);
426427
const jsdoc = parseComment(comment, indent, !ruleConfig.noTrim);
427428
const settings = getSettings(context);
428429
const report = makeReport(context, comment);

0 commit comments

Comments
 (0)