mirror of
https://github.com/fmhy/edit.git
synced 2026-01-20 10:51:16 +11:00
Merge branch 'nbats:main' into main
This commit is contained in:
commit
01d05fac96
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ def replace_domain_and_page(text):
|
|||
return text
|
||||
|
||||
def replace_underscore_in_subsections(text):
|
||||
pattern = r'(/#[\w]+(?:_[\w]+)*)'
|
||||
pattern = r'(/#[\w\-]+(?:_[\w]+)*)'
|
||||
matches = re.findall(pattern, text)
|
||||
for match in matches:
|
||||
replacement = match.replace('_', '-')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue