Skip to content

Commit 798e533

Browse files
committed
trim pharases for nested comments
1 parent d5e1f98 commit 798e533

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/idlfetcher.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,11 @@ function getCommentText(text: string) {
136136
return text
137137
.replace(//g, "'")
138138
.split("\n")
139-
.map(line => line.trim())
140139
.filter(line => !!line)
141-
.map(line => line.slice(getIndentation(line))).join("\n");
140+
.join("\n")
141+
// Filters out phrases for nested comments as we retargets them:
142+
// "This operation receives a dictionary, which has these members:"
143+
.replace(/[,.][^,.]+:/g, ".");
142144
}
143145

144146
function* generateDescriptionPairs(domIntro: Element) {

0 commit comments

Comments
 (0)