How to indent a few lines in Markdown markup?

后端 未结 22 754
予麋鹿
予麋鹿 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:14

    There's no way to do that in markdown's native features. However markdown allows inline HTML, so writing

          This will appear with six space characters in front of it
    

    will produce:

          This will appear with six space characters in front of it

    If you have control over CSS on the page, you could also use a tag and style it, either inline or with CSS rules.

    Either way, markdown is not meant as a tool for layout, it is meant to simplify the process of writing for the web, so if you find yourself stretching its feature set to do what you need, you might look at whether or not you're using the right tool here. Check out Gruber's docs:

    http://daringfireball.net/projects/markdown/syntax#html

提交回复
热议问题