Skip to content

Commit

Permalink
fix: regex
Browse files Browse the repository at this point in the history
  • Loading branch information
TOsmanov committed Oct 10, 2024
1 parent 54d782b commit cb200ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions foliant/preprocessors/includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,10 @@ def _find_anchors(self, content: str) -> list:
anchors = re.findall(r'\<anchor\>([\-\_A-Za-z0-9]+)\<\/anchor\>', content)
for anchor in anchors:
anchors_list.append(anchor)
custom_ids = re.findall(r'\{\#([\-A-Za-z0-9]+)\}', content)
custom_ids = re.findall(r'\{\#([\-\_A-Za-z0-9]+)\}', content)
for anchor in custom_ids:
anchors_list.append(anchor)
elements_with_ids = re.findall(r'id\=[\"\']([\-A-Za-z0-9]+)[\"\']', content)
elements_with_ids = re.findall(r'id\=[\"\']([\-\_A-Za-z0-9]+)[\"\']', content)
for anchor in elements_with_ids:
anchors_list.append(anchor)
return anchors_list
Expand Down

0 comments on commit cb200ef

Please sign in to comment.