Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex Syntax Warning Fix #1453

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading