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
In technical writing, it's common to want to include collapsible sections for content that might be useful, but which you don't want to spam out the full height of your post. E.g. a large code listing.
For comparison, GitHub supports this via the standard <details> tag, whereas Discourse has its own [details="Summary"] ... [/details] syntax.
Kramdown already tolerates at least some HTML input (e.g. <p>, <a>, <b>, <u>, etc.), including <details>. However, it doesn't process any of the MarkDown markup that might be inside that body, so e.g. it's impossible to use MarkDown links or code blocks within collapsible sections.
Example:
<details>
<summary>Click to expand</summary>
[Example link](http://example.com)
``` ruby
p "Hello, world!"
```
> quote block
</details>
In technical writing, it's common to want to include collapsible sections for content that might be useful, but which you don't want to spam out the full height of your post. E.g. a large code listing.
For comparison, GitHub supports this via the standard
<details>
tag, whereas Discourse has its own[details="Summary"] ... [/details]
syntax.Kramdown already tolerates at least some HTML input (e.g.
<p>
,<a>
,<b>
,<u>
, etc.), including<details>
. However, it doesn't process any of the MarkDown markup that might be inside that body, so e.g. it's impossible to use MarkDown links or code blocks within collapsible sections.Example:
GitHub rendering:
Click to expand
Example link
The text was updated successfully, but these errors were encountered: