Skip to content

Commit

Permalink
Update scripts/scrape-roku-docs.ts
Browse files Browse the repository at this point in the history
handle whitespace fixes in scraped docs as well

Co-authored-by: Bronley Plumb <bronley@gmail.com>
  • Loading branch information
markwpearce and TwitchBronBron authored Oct 29, 2024
1 parent 5161927 commit a8e9163
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/scrape-roku-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,12 +817,12 @@ class Runner {

private fixFunctionParams(text: string): string {
return text.replace(/to as /ig, 'toValue as ')
.replace(/as int$/ig, 'as integer')
.replace(/as int,/ig, 'as integer,')
.replace(/as int\)/ig, 'as integer)')
.replace(/as bool$/ig, 'as boolean')
.replace(/as bool,/ig, 'as boolean,')
.replace(/as bool\)/ig, 'as boolean)');
.replace(/as\s+int\s*$/ig, 'as integer')
.replace(/as\s+int\s*,/ig, 'as integer,')
.replace(/as\s+int\s*\)\s*/ig, 'as integer)')
.replace(/as\s+bool\s*$/ig, 'as boolean')
.replace(/as\s+bool\s*,/ig, 'as boolean,')
.replace(/as\s+bool\s*\)/ig, 'as boolean)');
}

private getMethod(text: string) {
Expand Down

0 comments on commit a8e9163

Please sign in to comment.