Skip to content

Commit

Permalink
Fix language codes additions with "’"
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertbossot committed Apr 29, 2024
1 parent e817d33 commit 720fd7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wiktionary/fr_wiktionary_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ def add_language_code_with_named_parameter_to_template(
return next_template(final_page_content, page_content)

# Correct language code with the paragraph's one
regex_lang = r'^[^{}]+\| *lang(?:gue|1)? *= *([\w\- ]*)'
regex_lang = r'^[^{}]+\| *lang(?:gue|1)? *= *([\w\- \'’]*)'
p = re.compile(regex_lang)
m = p.match(page_content)
if m is None:
Expand Down

0 comments on commit 720fd7a

Please sign in to comment.