_ Italics in details doesn't.
-
@gribnit said in Let's see who else will solve this...:
@by-joining-this-group-you-agree-to-be-mentioned-randomly-for-no-reason-is-that-okay-yes-no
"Always 'Wallbanger'?""_Especially_ 'Wallbanger'"Italics is bugged in the details. At least in the original post. Not sure about here.
Yep, here too.
-
Not a bug. Following the spec: https://spec.commonmark.org/0.28/#html-blocks
-
wrong
-
@gribnit said in _ Italics in details doesn't.:
bugged in the details.
Technically? No. But it's obvious you're unless you're a markdumb expert.
-
-
@gribnit Weirdly enough, it seems to work, as in do what I want, when I guess it shouldn't, some of the time.
-
@gribnit said in _ Italics in details doesn't.:
*not italicized* and _not italicized_
italicized
italicizedApparently it works if there's something on the line before it (in your original post, the @by-joining-this-group-you-agree-to-be-mentioned-randomly-for-no-reason-is-that-okay-yes-no mention is what made it work)
-
*italicized* _italicized_italicized italicized
*not italicized* _not italicized__not italicized_ *not italicized*
italicized italicizeditalicized italicized
-
@ben_lubar said in _ Italics in details doesn't.:
Not a bug. Following the spec: https://spec.commonmark.org/0.28/#html-blocks
-
Hey! Doesn't match the preview!
-
@zecc said in _ Italics in details doesn't.:
Hey! Doesn't match the preview!
The preview doesn't have Ben's html sanitizer running on it?
-
@zecc A bunch of things are different in the preview. For example, nested quotes are not collapsed.
-
@coderpatsy said in _ Italics in details doesn't.:
Apparently it works if there's something on the line before it
When in doubt, add a line break.
-
@tsaukpaetra said in _ Italics in details doesn't.:
@zecc said in _ Italics in details doesn't.:
Hey! Doesn't match the preview!
The preview doesn't have Ben's html sanitizer running on it?
The preview has exactly the same HTML (except for collapsed iframely stuff to avoid request spam) but different CSS (for some reason).
-
@gribnit said in _ Italics in details doesn't.:
@ben_lubar <details>*italicized* and _italicized_</details> <details>*not italicized*</details> <details>_not italicized_</details>
Your first line (in the raw post) is not interpreted as an HTML block, according to the spec that he posted. That's why the markdown "works" in that line.
Loosely stated, an HTML block begins with any line that begins with an HTML tag, and continues until a blank line.
This line:
@ben_lubar <details>*italicized* and _italicized_</details>
does not begin with an HTML tag, so it is not the beginning of an HTML block.
This line:
<details>*not italicized*</details>
does begin with an HTML tag, so it is the beginning of an HTML block (which continues until it reaches a blank line, which means it continues for the rest of your post).
fake edit: holy fucking regression batman, is that a mention inside the code block? And it's italicized? WTF.
-
@anotherusername Okay, this seems consistent with observed as far as I want to try to remember or check.
-
@gribnit so basically, if you want to get out of a HTML block and use Markdown (note that this doesn't mean you have to end the HTML element that you started), you just add a blank line.
<details><summary>This is an *HTML block*, because the line started with an HTML tag</summary> *Since the blank line ended the HTML block, this will now be parsed as Markdown* *(<u>note</u> that HTML is <b>still allowed</b> here)*</details>
Produces:
This is an *HTML block*, because the line started with an HTML tag
Since the blank line ended the HTML block, this will now be parsed as Markdown
(note that HTML is still allowed here)
-
@anotherusername
basically
does not account for observed behavior when posting to the thread with an initial<details>
element - the content of such an element appears to be markdown even without line breaks, as seen in details post above.
-
First *thing in post* does get processed by markdown
At least **in preview**Testing some variations
Summary on *same line*
No **blank line** before contentsSummary on *same line*
Blank line before contents
Summary on *next line*
No **blank line** before contentsSummary on *next line*
Blank line before contents
Summary after *blank line*
No **blank line** before contentsSummary after *blank line*
Blank line before contents
source
<details><summary>First *thing in post* does get processed by markdown</summary> At least **in preview**</details> Testing some variations <details><summary>Summary on *same line*</summary> No **blank line** before contents</details> <details><summary>Summary on *same line*</summary> **Blank line** before contents</details> <details> <summary>Summary on *next line*</summary> No **blank line** before contents</details> <details> <summary>Summary on *next line*</summary> **Blank line** before contents</details> <details> <summary>Summary after *blank line*</summary> No **blank line** before contents</details> <details> <summary>Summary after *blank line*</summary> **Blank line** before contents</details>
-
@gribnit said in _ Italics in details doesn't.:
@anotherusername
basically
does not account for observed behavior when posting to the thread with an initial<details>
element - the content of such an element appears to be markdown even without line breaks, as seen in details post above.There are a billion details posts above, mind linking me to the one that you're talking about?
Far as I can tell, all of them follow the expected behavior.Okay, I see it's the 8th post, and it resembles the one that @hungrier just posted. That doesn't fit. Maybe the regexp doesn't work at the beginning of the post?
-
I sense you're just not trying enough.
-
@pie_flavor So we have another variation:
Blank line inside the summary element but before the content of the summary lets it get processed
But it looks doofy as fuck; also, markdown in the detail content gets processed without another blank line before it
-
@hungrier Not sure that's a variation, blank line seems to have high priority in this decision.
-
@anotherusername said in _ Italics in details doesn't.:
And it's italicized? WTF.
That's just the Markdown syntax highlighting.
-
@ben_lubar So the mention inside it didn't actually generate a mention?
It sure generated a link, as though it should generate a mention...
-
@anotherusername I'm not sure whether it generates a mention, but the code for generating notifications uses a different regex than the code for rendering mentions in posts.
-