How to indent a few lines in Markdown markup?

后端 未结 22 632
予麋鹿
予麋鹿 2020-12-12 08:42

I want to write a few lines of text. They should be formatted normally except each line should start at the 6th column. I.e. I don\'t want the code block formatting rule to

相关标签:
22条回答
  • 2020-12-12 09:18

    See if this ">" helps:

    Line 1
    > line 2 
    >> line 3
    
    0 讨论(0)
  • 2020-12-12 09:18

    I would use   is a lot cleaner in my opinion.

    0 讨论(0)
  • 2020-12-12 09:20

    If you really must use tabs, and you don't mind the grey background-color and padding, <pre> tags might work (if supported):

    <pre>
    This        That        And             This
    That        This        And             That    
    </pre>
    
    This        That        And             This
    That        This        And             That    
    
    0 讨论(0)
  • 2020-12-12 09:26

    To answer MengLu and @lifebalance's questions in response to SColvin's answer (which I much prefer to the accepted answer for the control it provides), it seems as though you could just target a parent element of the lists when setting the display to none, adding a surrounding element if necessary. So if we suppose we're doing this for a table of contents, we can extend SColvin's answer:

    HTML

    <nav class="table-of-contents">
      this is a normal line of text
      * this is the first level of bullet points, made up of <space><space>*<space>
        * this is more indented, composed of <space><space><space><space>*<space>
    </nav>
    

    CSS

    .table-of-contents ul {
      list-style-type: none;
    }
    
    0 讨论(0)
提交回复
热议问题