markdown-link-check icon indicating copy to clipboard operation
markdown-link-check copied to clipboard

Add stop/break option in `replacementPatterns`?

Open cofyc opened this issue 5 years ago • 2 comments

Currently, the replacement patterns are applied one by one. Sometimes, we may want to stop when one of them is executed.

cofyc avatar Jul 31 '19 06:07 cofyc

Would you like to have an option to enable that behaviour, and keep the current behaviour as the default one?

Behaviour would be :

for each link in the file, do:
   for each replacement pattern in the config, sorted in config order, do:
       check the link against the pattern: 
           if matches and "stop after first matched pattern" option is true => go to next link
           if no match, try with the next pattern
       ...

NicolasMassart avatar Sep 25 '20 16:09 NicolasMassart

yes, an option is good

cofyc avatar Sep 25 '20 16:09 cofyc