Skip to content

Commit

Permalink
Merge pull request #1453 from Isaac-Flath/RegexSyntaxWarning
Browse files Browse the repository at this point in the history
Regex Syntax Warning Fix
  • Loading branch information
jph00 authored Sep 24, 2024
2 parents 3e8f6ae + 356ec11 commit bb3bdb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nbdev/quarto.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _recursive_parser(
set_index: bool = True): # If `True`, `index` file will be set to href.
for name, val in dir_dict.items():
if type(val) is str:
if re.search('index\..*', re.sub(r'^\d+_', '', val)) and set_index and section:
if re.search(r'index\..*', re.sub(r'^\d+_', '', val)) and set_index and section:
section.update({'href': str(dirpath/val)})
else:
contents.append(str(dirpath/val))
Expand Down
2 changes: 1 addition & 1 deletion nbs/api/14_quarto.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
" set_index: bool = True): # If `True`, `index` file will be set to href.\n",
" for name, val in dir_dict.items():\n",
" if type(val) is str:\n",
" if re.search('index\\..*', re.sub(r'^\\d+_', '', val)) and set_index and section:\n",
" if re.search(r'index\\..*', re.sub(r'^\\d+_', '', val)) and set_index and section:\n",
" section.update({'href': str(dirpath/val)})\n",
" else:\n",
" contents.append(str(dirpath/val))\n",
Expand Down

0 comments on commit bb3bdb0

Please sign in to comment.