<details? in GFM (discount)
Hello,
Not sure if my Marked2 is just configured improperly, so gonna ask here before I file a bug report.
When using the...
<details>
<summary>Hello World</summary>
code blocks inside of here are somewhat broken
</details>
...this style of markdown works in GFM (at least on github itself)
It only sorta works in Marked2
I have attached an image to show the issue.
Basically, the code block doesn't expand properly if nested in that
details element
NOTE:
If I toggle the export drawer, it temporarily fixes this.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 17 Sep, 2016 02:11 PM
I'm curious about the rest of your settings. I'm not seeing this
behavior locally: http://ckyp.us/nG3h
Please go to Help->Report an issue and copy out the settings you see
there to paste into this discussion. If possible, also attach a Markdown
file that demonstrates the issue for you.
Thanks,
Brett
Support Staff 2 Posted by Brett on 17 Sep, 2016 03:54 PM
I did find some odd behavior when there is content following the nested code block. This is because as a part of syntax highlighting, Marked measures pre/code blocks on the page and maintains their size during resize and theme changes. When the code block is visible in the dom but hidden by the HTML, the measurements are skewed. I'll look into add an event handler for detail blocks opening and correct sizes on expansion.
In the meantime, it would be possible to just add the open param to the detail blocks while writing (
<details open>
) to circumvent, or add a quick JavaScript to the document that added it, and then remove that when publishing.Inserting this at the end of the document opens all details nodes automatically.