File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -906,7 +906,7 @@ export function emitWebIdl(
906906 comments . push ( "Available only in secure contexts." ) ;
907907 }
908908 if ( entity . mdnUrl ) {
909- comments . push ( "" ) ;
909+ if ( comments . length > 0 ) comments . push ( "" ) ;
910910 comments . push ( `[MDN Reference](${ entity . mdnUrl } )` ) ;
911911 }
912912
Original file line number Diff line number Diff line change 11import fs from "fs/promises" ;
22import { basename } from "path" ;
3+
34const basePath = new URL (
45 "../../inputfiles/mdn/files/en-us/web/api/" ,
56 import . meta. url ,
@@ -43,7 +44,7 @@ function extractSummary(markdown: string): string {
4344 // Extract the first sentence (ending in . ! or ?)
4445 const sentenceMatch = normalizedText . match ( / ( .* ?[ . ! ? ] ) (? = \s | $ ) / ) ;
4546 if ( sentenceMatch ) {
46- return sentenceMatch [ 0 ] ;
47+ return sentenceMatch [ 0 ] ; // Return the first full sentence
4748 }
4849
4950 const firstWord = normalizedText . split ( " " ) [ 0 ] ;
You can’t perform that action at this time.
0 commit comments