• SatyrSack@feddit.org
      link
      fedilink
      English
      arrow-up
      12
      ·
      4 days ago

      Huh. Apparently, when nesting spoilers, you only use one end “tag”

      Spoiler 1

      Test

      Spoiler 2

      Test

      Spoiler 3

      Test

      ::: spoiler Spoiler 1
      Test
      ::: spoiler Spoiler 2
      Test
      ::: spoiler Spoiler 3
      Test
      :::
      
      • SatyrSack@feddit.org
        link
        fedilink
        English
        arrow-up
        7
        ·
        4 days ago

        @ptz@dubvee.org

        FYI Tesseract does not render nested spoilers like Lemmy UI, Thunder, and Voyager do. Tesseract requires an end tag for each start tag. For what it’s worth, Jerboa doesn’t seem to support nested spoilers either way.

        Spoiler 1

        Test

        Spoiler 2

        Test

        Spoiler 3

        Test

        ::: :::

        ::: spoiler Spoiler 1
        Test
        ::: spoiler Spoiler 2
        Test
        ::: spoiler Spoiler 3
        Test
        :::
        :::
        :::
        
        • Admiral Patrick@dubvee.org
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          2 days ago

          Thanks. I’ll take a look.

          Not an issue I would have thought to check since you should always close the tags you open lol 🤷🏻‍♂️

          • SatyrSack@feddit.org
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            2 days ago

            Right??? I wonder if that is even intentional. That also makes it so you cannot have two child spoilers nested at the same level within the same parent spoiler. Something like this should work, but noooooo, the end tags just don’t work like you’d expect:

            ::: spoiler Spoiler 1
            Test
            ::: spoiler Spoiler 2a
            Test
            :::
            ::: spoiler Spoiler 2b
            Test
            :::
            :::
            
            Spoiler 1

            Test

            Spoiler 2a

            Test

            Spoiler 2b

            Test

            :::

            EDIT: Tesseract also adds an extra newline above each start tag in the code block above. In the actual comment source, there are no blank lines in the code block.

            • Admiral Patrick@dubvee.org
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              2 days ago

              The newline is actually intentional. I use a different markdown renderer, and it needs it apparently; otherwise, it doesn’t detect the closing tag. The Photon dev recommended another markdown library that works well with Svelte (which is why I switched from markdown-it), but I haven’t had a chance to look into integrating it.