You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/kallewesterling/opt/anaconda3/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs/__main__.py", line 133, in serve_command
serve.serve(
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 141, in serve
config = builder()
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 136, in builder
build(config, live_server=live_server, dirty=dirty)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs/commands/build.py", line 271, in build
_populate_page(file.page, config, files, dirty)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs/commands/build.py", line 167, in _populate_page
page.markdown = config['plugins'].run_event(
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs/plugins.py", line 94, in run_event
result = method(item, **kwargs)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs_nav_enhancements/__init__.py", line 118, in on_page_markdown
new_title = self._look_for_title_in_markdown(markdown)
File "/Users/kallewesterling/opt/anaconda3/lib/python3.8/site-packages/mkdocs_nav_enhancements/__init__.py", line 104, in _look_for_title_in_markdown
next_line_chars = set( lines[ line_number + 1 ].strip() )
IndexError: list index out of range
I think a solution would be, maybe to wrap this in a try and except IndexError where the exception would just continue in the wrapping for loop (on line 74).
The text was updated successfully, but these errors were encountered:
Line 104 makes the entire flow crash if one of the included markdown files in config's
nav
is empty:mkdocs-nav-enhancements/mkdocs_nav_enhancements/__init__.py
Line 104 in d7ca8cd
Here's the error, for reference:
I think a solution would be, maybe to wrap this in a
try
andexcept IndexError
where the exception would justcontinue
in the wrappingfor
loop (on line 74).The text was updated successfully, but these errors were encountered: