Skip to content
Open
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 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main():
`the repository issues page <https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues>`_
if you encounter any problems, and create a new issue if needed!
""", # noqa: E501
version='0.5.1',
version='0.5.2alpha-jc',
author='ipython-contrib and jupyter-contrib developers',
author_email='jupytercontrib@gmail.com',
url=('https://github.com/'
Expand Down
8 changes: 7 additions & 1 deletion src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
toc_position: {},
toc_section_display: true,
toc_window_display: false,
toc_markdown_in_output_cells: true,
};
$.extend(true, default_cfg, metadata_settings);

Expand Down Expand Up @@ -588,7 +589,11 @@
// excepting any header which contains an html tag with class 'tocSkip'
// eg in ## title <a class='tocSkip'>,
// or the ToC cell.
all_headers = $('.text_cell_render').find('[id]:header:not(:has(.tocSkip))');
var markdown_cell_css_classes = '.text_cell_render';
if (cfg.toc_markdown_in_output_cells) {
markdown_cell_css_classes += ',.output_markdown';
}
all_headers = $(markdown_cell_css_classes).find('[id]:header:not(:has(.tocSkip))');
var min_lvl = 1 + Number(Boolean(cfg.skip_h1_title)),
lbl_ary = [];
for (; min_lvl <= 6; min_lvl++) {
Expand Down Expand Up @@ -743,6 +748,7 @@
build_setting_input('sideBar', 'Display as a sidebar (otherwise as a floating window)', 'checkbox'),
build_setting_input('toc_window_display', 'Display ToC window/sidebar at startup', 'checkbox'),
build_setting_input('toc_section_display', 'Expand window/sidebar at startup', 'checkbox'),
build_setting_input('toc_markdown_in_output_cells', 'Capture Markdown headings in Cell Output and add them to ToC', 'checkbox'),
])
.appendTo(dialog_content);
$('<div class="modal-footer">')
Expand Down