7 votes

I think formatting is broken inside expandable "<details>" sections

UPDATE:

It is actually NOT broken, but it seems that a blank line is required after the <summary> tags for it to work.

  • Therefore, this does not work:

     > Interstellar - just watch it
    
     I like this movie a lot. BUT, it bothers me that
    
     <details>
     <summary>spoiler</summary>
     a story so grounded in hard science fiction chose an unjustified book
     metaphor to represent a dimension that would be, for us, absolutely
     unknowable. I much prefer the choice made by Kubrick in *2001, A Space
     Odyssey*: to represent one abstraction with another, preserving the
     alien character of an inhuman reality.
     </details>
    
  • But this does:

      > Interstellar - just watch it
    
      I like this movie a lot. BUT, it bothers me that
    
      <details>
      <summary>spoiler</summary>
    
      a story so grounded in hard science fiction chose an unjustified book
      metaphor to represent a dimension that would be, for us, absolutely
      unknowable. I much prefer the choice made by Kubrick in *2001, A Space
      Odyssey*: to represent one abstraction with another, preserving the
      alien character of an inhuman reality.
      </details>
    

4 comments

  1. [4]
    unknown user
    Link
    This behaviour seems to be in accordance with the Common Mark Spec: In general, a good rule of thumb is that you shouldn't mix HTML and non-HTML mark-up when using markdownoids.

    This behaviour seems to be in accordance with the Common Mark Spec:

    1. Start condition: line begins the string < or </ followed by one of the strings (case-insensitive) (…) details, (…), summary, (…), followed by whitespace, the end of the line, the string >, or the string />.

      End condition: line is followed by a blank line.

    In general, a good rule of thumb is that you shouldn't mix HTML and non-HTML mark-up when using markdownoids.

    5 votes
    1. [3]
      mrbig
      Link Parent
      That makes sense. It doesn't make sense to expect regular people to read the spec, though. I'll make a suggestion to the docs to make that clear.

      That makes sense. It doesn't make sense to expect regular people to read the spec, though. I'll make a suggestion to the docs to make that clear.

      2 votes
      1. [2]
        Algernon_Asimov
        Link Parent
        You don't need to "make a suggestion to the docs": you can update them directly yourself. Most of the official docs pages now have draft working copies in the wiki. Go to ~tildes.official, and...

        You don't need to "make a suggestion to the docs": you can update them directly yourself. Most of the official docs pages now have draft working copies in the wiki. Go to ~tildes.official, and look at the wiki pages in the sidebar. Update the relevant wiki page.

        Deimos has told me that he'll monitor these wiki pages for updates, and then migrate them to the docs site. Alternatively, you can message him to let him know there's an update.

        In this case, I've added a sentence about this to the Expandable Sections part of the instructions.

        2 votes
        1. mrbig
          (edited )
          Link Parent
          That is what I meant by "suggestion" ;) But it seems you already did that, so thanks!

          you can update them directly yourself. Most of the official docs pages now have draft working copies in the wiki. Go to ~tildes.official, and look at the wiki pages in the sidebar. Update the relevant wiki page.

          That is what I meant by "suggestion" ;)

          But it seems you already did that, so thanks!

          2 votes