38 votes

Minor text formatting updates

I've just updated the site's markdown processor a bit to allow a few more HTML tags through, and added a section to the Text Formatting docs page to explain these options. The short form is that the following formatting is available only by using HTML (some of these may be added with markdown syntax eventually):

  • strikethrough - <del> tag
  • strike replace - <del> and <ins> tags
  • superscript - <sup> tag
  • subscript - <sub> tag
  • Tables - using <table>, <tr>, <th>, and <td>

I think at this point we should probably have almost all of the wanted formatting available, but there may still be a few missing.

28 comments

  1. [5]
    CALICO
    Link
    Good stuff, these are a great addition. But, one question: Why HTML for tables, as opposed to something like how Reddit uses pipes ( | )? I don't really use other sites that utilize table...

    Good stuff, these are a great addition. But, one question:
    Why HTML for tables, as opposed to something like how Reddit uses pipes ( | )? I don't really use other sites that utilize table formatting, so I don't know what other options there are.
    Is there a technical reason, is it arbitrary, is it a preference thing, etc

    13 votes
    1. [2]
      Deimos
      Link Parent
      It's possible to support the markdown syntax as well, and I probably will eventually. That's not a core part of markdown, so it's an "extension" that I'll have to enable. That pipe syntax gets...

      It's possible to support the markdown syntax as well, and I probably will eventually. That's not a core part of markdown, so it's an "extension" that I'll have to enable.

      That pipe syntax gets really ugly really quickly though, so I think one benefit of allowing HTML is that you can use all the existing "HTML table generator" type of tools that make it quite easy, and then just copy-paste the output into your post.

      16 votes
      1. cfabbro
        Link Parent
        Many spreadsheet programs and web apps natively support exporting to HTML too, but not usually markdown.

        Many spreadsheet programs and web apps natively support exporting to HTML too, but not usually markdown.

        9 votes
    2. [2]
      meghan
      Link Parent
      The pipe syntax is Markdown. As is the [ ] ( ) link syntax. I actually really like how Tildes uses a lot more "raw" type formatting. http://commonmark.org/help/

      The pipe syntax is Markdown. As is the [ ] ( ) link syntax. I actually really like how Tildes uses a lot more "raw" type formatting. http://commonmark.org/help/

      4 votes
      1. Kraetos
        Link Parent
        No it’s not. It’s not in the CommonMark reference you posted and it certainly isn’t in the original Perl implementation either.

        The pipe syntax is Markdown.

        No it’s not. It’s not in the CommonMark reference you posted and it certainly isn’t in the original Perl implementation either.

        10 votes
  2. [8]
    Comment deleted by author
    Link
    1. [8]
      Comment deleted by author
      Link Parent
      1. [8]
        Comment deleted by author
        Link Parent
        1. [8]
          Comment deleted by author
          Link Parent
          1. [7]
            havoc
            Link Parent
            Hidden messages should be a good reason for those responsible or liable for the content on the site.

            but there’s also no specific reason to prevent it

            Hidden messages should be a good reason for those responsible or liable for the content on the site.

            1 vote
            1. [7]
              Comment deleted by author
              Link Parent
              1. [6]
                havoc
                Link Parent
                If you noticed the text, it isn't hidden anymore.

                If you noticed the text, it isn't hidden anymore.

                1 vote
                1. [5]
                  666
                  (edited )
                  Link Parent
                  You can always hide messages using empty links and title attributes. Can you see mine in this comment? Edit: this is so well hidden that it is not even rendered, it only appears when I click edit....

                  You can always hide messages using empty links and title attributes.

                  Can you see mine in this comment?

                  Edit: this is so well hidden that it is not even rendered, it only appears when I click edit. https://i.imgur.com/hlOUIeK.png

                  4 votes
                  1. [4]
                    havoc
                    Link Parent
                    It isn't hiding anything as it is not merely not rendered but discarded. That's more like it!

                    It isn't hiding anything as it is not merely not rendered but discarded.
                    That's more like it!

                    2 votes
                    1. [3]
                      666
                      Link Parent
                      It's not completely discarded, it is saved in the database, but nobody will see it because it is not rendered (as in converted from markdown to html and sent to the browser).

                      It's not completely discarded, it is saved in the database, but nobody will see it because it is not rendered (as in converted from markdown to html and sent to the browser).

                      1 vote
                      1. [2]
                        havoc
                        Link Parent
                        Your reply made no sense in regards to the argument here, so I emphasized it is also not part of the html source. The concrete processing path is irrelevant here, unless it points out how the text...

                        Your reply made no sense in regards to the argument here, so I emphasized it is also not part of the html source. The concrete processing path is irrelevant here, unless it points out how the text is noticeable or visible to the naked eye.

                        1 vote
                        1. 666
                          Link Parent
                          Welp, it looks like I misunderstood the argument. It can sometimes happen. I'm also two days late to reply, I rarely use internet during the weekends.

                          Welp, it looks like I misunderstood the argument. It can sometimes happen. I'm also two days late to reply, I rarely use internet during the weekends.

                          1 vote
  3. [3]
    mendacities
    Link
    Any plans/interest/antipathy towards adding spoiler code of some sort? It could be very useful in, e.g., ~books...

    Any plans/interest/antipathy towards adding spoiler code of some sort? It could be very useful in, e.g., ~books...

    7 votes
    1. [2]
      cfabbro
      Link Parent
      Yep, although there is no specific timeline on when or even how it will be implemented yet.

      Yep, although there is no specific timeline on when or even how it will be implemented yet.

      5 votes
      1. mendacities
        Link Parent
        Durr, never even thought to check the issues.

        Durr, never even thought to check the issues.

        2 votes
  4. dredmorbius
    Link
    It's a pandoc extension, but I'm inordinately fond of footnotes (endnotes): This is text about a thing.[^thing] [^thing]: And this is a note about a thing. Also another vote for tables. I've been...

    It's a pandoc extension, but I'm inordinately fond of footnotes (endnotes):

    This is text about a thing.[^thing]
    
    [^thing]: And this is a note about a thing.
    

    Also another vote for tables. I've been known to use them. Pipe syntax is relatively sane. (Though who am I to judge?)

    7 votes
  5. [5]
    havoc
    Link
    Do you plan to implement a more feature-rich markdown parser? It makes little sense to rely solely on commonmark as it is now. And users shouldn't need to rely on external tools for formatting.

    Do you plan to implement a more feature-rich markdown parser? It makes little sense to rely solely on commonmark as it is now. And users shouldn't need to rely on external tools for formatting.

    4 votes
    1. [4]
      Deimos
      Link Parent
      I don't have any plans. What features do you think are missing, and what's more capable than CommonMark?

      I don't have any plans. What features do you think are missing, and what's more capable than CommonMark?

      5 votes
      1. [3]
        havoc
        Link Parent
        Tables should be done in markdown. It's already a lot for normal people, not to mention html tags or external tools. Support for spoilers, math markup, task lists, footnotes, citations is missing...

        Tables should be done in markdown. It's already a lot for normal people, not to mention html tags or external tools. Support for spoilers, math markup, task lists, footnotes, citations is missing in CommonMark. ( Btw, you should enable #fragments--which should be available--so people can write indexes)

        Everything you've listed at the top should also be available in markdown as well. It's the entire point of markdown to make the written source more readable. Markdown is also used on many sites. While there are slight differences, the system is overall the same so it is easy to adapt.

        5 votes
        1. [2]
          Deimos
          Link Parent
          Most of those are extremely niche features that will almost never be used. I'm also already using GitHub Flavored Markdown, which has extensions (that aren't currently enabled) for tables,...

          Most of those are extremely niche features that will almost never be used. I'm also already using GitHub Flavored Markdown, which has extensions (that aren't currently enabled) for tables, strikethrough, and task lists: https://github.github.com/gfm/

          Is there some other form of markdown or other formatting language that supports all of the things you listed?

          5 votes
          1. havoc
            Link Parent
            Well, niche is relative. Most of the time, it's a matter of awareness. This is a forum that pays attention to text; so if you make a short reference quickly noticeable and accessible, and a long...

            Well, niche is relative. Most of the time, it's a matter of awareness.
            This is a forum that pays attention to text; so if you make a short reference quickly noticeable and accessible, and a long one easy to understand, people will use it.

            Markdig is the one that covers it all, but it's a C# implementation.

            4 votes
  6. [7]
    nil
    Link
    What about <PRE>? Pretty please?! :)

    What about <PRE>? Pretty please?! :)

    1. [4]
      unknown user
      Link Parent
      Any reason ``` triple backticks ``` are insufficient? (or am I misremembering what the pre tag does?)

      Any reason

      ```
      triple backticks
      ```
      

      are insufficient? (or am I misremembering what the pre tag does?)

      3 votes
      1. pseudolobster
        Link Parent
        I think the fact triple backticks exist means pre tags are passed Edit: yes, they do work. Triple backtics create <code> blocks though..
        I think the fact triple backticks exist means pre tags are passed
        Edit: yes, they do work. Triple backtics create <code> blocks though..
        2 votes
      2. [2]
        nil
        Link Parent
        Laziness and wanting to avoid learning a new markup, I guess. :) Just kidding! Triple backticks will do fine! Thanks! test

        Laziness and wanting to avoid learning a new markup, I guess. :)

        Just kidding! Triple backticks will do fine! Thanks!

        test
        
        1 vote
        1. [2]
          Comment deleted by author
          Link Parent
          1. nil
            Link Parent
            Also useful! Thanks!

            Also useful! Thanks!

            2 votes
    2. [2]
      Deimos
      Link Parent
      should already be allowed, isn't it? this was written in a pre block
      should already be allowed, isn't it?
      this was written
      in a pre      block
      
      2 votes
      1. nil
        Link Parent
        Great! Should have tried it before asking! :) test, which I should have done in ~test before posting

        Great! Should have tried it before asking! :)

        test, which I should have done in ~test before posting
        1 vote