0

I am trying to add collapsible "details" setcion/tag to a HTML document rendered from markdown by pandoc. Here is the md:

---
title: Use the details disclosure element
output:
  html_document:
    code_folding: hide
    keep_md: yes
---
a

<details>
  <summary>Click for Answer</summary>

### a1
a1

### a2
a2

</details> 

# a


The result look like on the screenshot below. The a section.level1 is now outside the main-container. For some reason the details part is closing the so far unclosed div. Is there some known fix, or I am missing a point?

Thank you

enter image description here

  • Does this answer your question? [How can I wrap my markdown in an HTML div?](https://stackoverflow.com/questions/29368902/how-can-i-wrap-my-markdown-in-an-html-div) – isherwood May 26 '22 at 13:10
  • Or this? [HTML inside Markdown](https://stackoverflow.com/questions/9243104/html-inside-markdown) Seems mixing HTML and markdown doesn't really work well. – isherwood May 26 '22 at 13:11

0 Answers0