We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e925548 commit 2dad952Copy full SHA for 2dad952
1 file changed
src/indexer/crawler.ts
@@ -357,8 +357,9 @@ export class DocumentCrawler {
357
* Extract category from URL
358
*/
359
private extractCategory(url: string): string {
360
- // eslint-disable-next-line no-useless-escape
361
- const match = url.match(/https?:\/\/[^\/]+\/(?:(?:\d+(?:\.\d+)*)\/)?(?:develop\/)?([^\/:]+)/);
+ const match = url.match(
+ /https?:\/\/[^/]+\/(?:.*\/)?(?:(?:\d+(?:\.\d+)*|develop)\/([^/]+)|([^/:\\s]+):)/
362
+ );
363
if (match) {
364
return match[1] || 'general';
365
}
0 commit comments