mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
PR-URL: https://github.com/nodejs/node/pull/39094 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
13 lines
338 B
JavaScript
13 lines
338 B
JavaScript
module.exports = function convertComments(comments) {
|
|
for (const comment of comments) {
|
|
if (comment.type === "CommentBlock") {
|
|
comment.type = "Block";
|
|
} else if (comment.type === "CommentLine") {
|
|
comment.type = "Line";
|
|
}
|
|
|
|
if (!comment.range) {
|
|
comment.range = [comment.start, comment.end];
|
|
}
|
|
}
|
|
}; |