Skip to content

Commit

Permalink
Address Casey's review
Browse files Browse the repository at this point in the history
- better comments in python tagging code

Co-authored-by: Casey Icenhour <cticenhour@gmail.com>
  • Loading branch information
GiudGiud and cticenhour committed Sep 27, 2023
1 parent 7e70ca0 commit c1b53dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/MooseDocs/extensions/tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ def postExecute(self):
for entry in key_list_regex:
regex_replace=f"'{entry}':"
tag_dict_str=re.sub(regex_replace,entry+':', tag_dict_str)
# add relative link from built from the path at the end of the tagging entry
# add relative link built from the path at the end of the tagging entry
if (entry == 'path'):
path_value = tag_dict_str.split("path: ")[1].split(',')[0]
path_value = tag_dict_str.split("path: ")[1].split(',')[0].replace("'", "")

# Split at the first modules/ (usually moose/modules/)
if 'modules/' in path_value:
path_value = path_value.split('modules/', 1)[1]
else:
# splitting at content is dangerous, same named paged within two different modules/xxx/doc/content
# splitting at content is dangerous, same named pages within two different modules/xxx/doc/content
# could be mixed together
path_value = path_value.split('content/')[1]

Expand Down

0 comments on commit c1b53dc

Please sign in to comment.