Hacker News new | past | comments | ask | show | jobs | submit login

The details tag is just html that you can fall back to in markdown: https://developer.mozilla.org/de/docs/Web/HTML/Element/detai...

The main contribution by Github's markdown renderer is that it doesn't remove that tag.




But how do they put code tags in there? Last time I checked, Markdown doesn't allow Markdown inside HTML tags. Or do they just wrap it in <code><pre> and the syntax highlighter picks it up later in the chain?


Markdown inside HTML tags is fine as long as there's a paragraph break (two newlines) between the Markdown and the HTML tag. So it usually goes like:

    <detail>
    <summary>...</summary>

    Some `markdown`
    
    </detail>
I would imagine this sort of behavior is in commonmark, but I am too lazy to check.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: