nbconvert icon indicating copy to clipboard operation
nbconvert copied to clipboard

collapsing of markdown block after exporting to HTML

Open lapotok opened this issue 5 years ago • 1 comments

Hello,

I'd like to make a markdown block that would contain a part that collapses using a <details>+<summary> html code.

# Header

Some text.

<details><summary>something to hide...</summary>
    
## Subheader
    
Some text
    
+ list element 1
+ list element 2
 
```python
print('Some code not-to-be-executed.')
test_function()
```
<br>

```
some output example
another string of output
```
</details>

It works perfectly well in Jupyter Lab alt text alt text

but fails after exporting the notebook to HTML. alt text

I tried also using separate raw blocks for the <details> + tag alt text

but it messes up the formatting and need some CSS adjustment <summary style="padding-left: 100px;">. alt text

It would be great for export HTML to agree with Jupyter Lab preview. Thank you in advance!

lapotok avatar Jan 19 '20 13:01 lapotok

Hey there @lapotok I'm going through old issues and it seems to me like this issue belongs in the nbconvert repository, so I will move it there.

ivanov avatar Mar 27 '24 23:03 ivanov