Markdown filter: limit URLs to be extracted to the ones matching a pattern

Issue #720 resolved
Kuro Kurosaka created an issue

A user of the Markdown filter would like to limit the URLs to be extracted (when the parameter translateUrls=true) to those that match with a certain pattern. A use case is to extract absolute URLs (starting with https://hostdomain) so that the translator can replace the URLs with the language specific URLs of an external site for the target language, while the keeping the relative URLs, since they are already under a language specific subsection.

To achieve this, we will introduce a new parameter, urlToTranslatePattern, which would hold a regular expression that must match for a URL to be extracted. The default of this parameter would be ".+", meaning any non-empty URLs shall be extracted if translteUrls=true.

Comments (3)

  1. Log in to comment