@@ -45,7 +45,7 @@ import * as rank from "./rank";
45
45
const $ = cheerio . load ( content , {
46
46
_useHtmlParser2 : true ,
47
47
decodeEntities : true
48
- } as any /* We are using a hidden option: _useHtmlParser2: https://github.com/cheeriojs/cheerio/discussions/1271 */ ) ;
48
+ } ) ;
49
49
50
50
const subheads = [ ] ;
51
51
@@ -161,23 +161,23 @@ import * as rank from "./rank";
161
161
return secondaries ;
162
162
}
163
163
164
- // Clean up (i.e., de-dupe, simplify, etc.) the items in a breadcrumb list.
165
- export function makeAncestorsList ( rawList : string [ ] ) {
166
- return Array . from ( new Set ( rawList ) . values ( ) )
167
- . filter ( s => s ?. trim ( ) !== "" )
168
- . map ( s => {
169
- if ( s === "Pulumi Registry" ) {
170
- return "Registry" ;
171
- }
172
- return s ;
173
- } ) ;
174
- }
175
-
176
- // Every Algolia record requires a unique ID. Since every record should also have a unique URL,
177
- // we use the URL to generate the unique ID.
178
- //
179
- // If, at some point, we find that we need to have two records pointing to the same URL, we can
180
- // add another parameter to the list and hash both.
181
- export function getObjectID ( { href } ) {
182
- return crypto . createHash ( "md5" ) . update ( href ) . digest ( "hex" ) ;
183
- }
164
+ // Clean up (i.e., de-dupe, simplify, etc.) the items in a breadcrumb list.
165
+ export function makeAncestorsList ( rawList ) {
166
+ return [ ... new Set ( rawList ) ]
167
+ . filter ( s => s ?. trim ( ) !== "" )
168
+ . map ( s => {
169
+ if ( s === "Pulumi Registry" ) {
170
+ return "Registry" ;
171
+ }
172
+ return s ;
173
+ } ) ;
174
+ }
175
+
176
+ // Every Algolia record requires a unique ID. Since every record should also have a unique URL,
177
+ // we use the URL to generate the unique ID.
178
+ //
179
+ // If, at some point, we find that we need to have two records pointing to the same URL, we can
180
+ // add another parameter to the list and hash both.
181
+ export function getObjectID ( { href } ) {
182
+ return crypto . createHash ( "md5" ) . update ( href ) . digest ( "hex" ) ;
183
+ }
0 commit comments