FIX html escape regex #394
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #373 which broke the docs in
huggingface_hub(see #373 (comment)). The issue is caused by a docstring in which both a"<"and a">"are written but not as a HTML tag (e.g."... <5MB .... .... something -> something else"). This PR fixes it, hopefully without breaking other docs.In details:
_re_lt_html:re.DOTALL(unused in the regex)re.IGNORECASE\w+to[a-z]after the first"<"=> the start of a tag must be a letter, not an alphanumeric. This way we don't capture string like"<5MB"anymore. This update fixes thehuggingface_hubissue._re_lt_htmland_re_lcub_svelteregexes outside ofconvert_md_to_mdxto compile them only once.