File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11import { MarkdownTableConverter } from 'src/markdown/MarkdownTableConverter' ;
22import { MarkdownTableFactory } from 'src/markdown/MarkdownTableFactory' ;
3+ import { RegexFactory } from 'src/regex/RegexFactory' ;
34import { WebsiteScraper } from 'src/scraping/WebsiteScraper' ;
45import { TrackablesUpdater } from 'src/tracking/TrackablesUpdater' ;
56import { Recipe } from '../Recipe' ;
@@ -98,7 +99,7 @@ export class HanayamaHuzzlesRecipe implements Recipe {
9899
99100 #markdownTableStringToHuzzles( markdownTableString : string ) : HanayamaHuzzle [ ] {
100101 const arrayOfArrays = this . markdownTableConverter . arrayOfArraysFromString ( markdownTableString ) ;
101- const imageLinkRegex = new RegExp ( / ! \[ [ ^ \] ] + \] \( (?< link > [ ^ ) ] + ) (? = \) ) / g ) ; // https://regex101.com/r/YlCOgc/2
102+ const imageLinkRegex = new RegexFactory ( ) . imageMarkdownLinkRegex ( ) ;
102103
103104 return arrayOfArrays . flatMap ( array => {
104105 if ( array . length < 5 ) {
Original file line number Diff line number Diff line change 1+ export class RegexFactory {
2+ imageMarkdownLinkRegex ( ) : RegExp {
3+ return new RegExp ( / ! \[ [ ^ \] ] + \] \( (?< link > [ ^ ) ] + ) (? = \) ) / g) ; // https://regex101.com/r/YlCOgc/2
4+ }
5+ }
You can’t perform that action at this time.
0 commit comments