Closed greghendershott closed 7 years ago
My initial guess/memory was wrong.
As soon as you use some HTML open tag, you basically "escape" into an HTML parser -- which won't parse markdown -- until the matching closing tag.
So for instance <p>Some _text_ here</p>
will not parse the underlines around text as <em>
; you'll get the underlines as "raw text".
Generally this is the safe/smart thing to do -- as best I understand, and as best I remember from the days when I tried to keep this markdown parsing logic in my brain.
Having said all that, I notice many markdown parsers do handle <details>
. Maybe I should add that as a special case.
(On the one hand I don't love special cases. But on the other hand I'm very worried about touching how HTML is handled, generally -- and breaking many things, generally. I don't have time now to chase down a lot of breakage. (I barely have time to attempt this as a limited special case.))
I have a commit for this. I'm going to sleep on it.
Incidentally, here's how various markdown parsers handle this%0A%60%60%60%0A%0A%3C%2Fdetails%3E%0A).
Backtick code blocks aren't recognized inside a
<details>
element. For example:Originally reported as https://github.com/greghendershott/frog/issues/202
Although I'd need to reload my brain as it's been months (years?) since I worked on the markdown parser, my initial guess is that nothing in the
details
element is being parsed as markdown -- possibly becausedetails
isn't in theblock-elements
set inhtml.rkt
?