Bitbucket README Markdown Ordered List Restarts After Code Block


Answer :

Insert 4 spaces before the blockquotes >. This serves two purposes at once: first, it indents the quote, so it aligns with the number above it (as it is part of that numbered item). Second, most MD parsers know this means the indented item should not interrupt the numbered list.

Actually, I think you're wrong to use a "block quote". Maybe you should use a regular indented 'code' here, using 4 spaces and backticks around your literal code:

  1. Clone the repository

    git clone URL

(Four spaces and ` around the command line.)


An even better answer, the general structure should be like this:

1. item n.1 2. item n.2          #!json         {             "key": "value"         }  3. item n.3 

So:

  1. Put a blank line before and after your code block.
  2. Indent everything with 8 spaces; no need to 3 backticks before and after the code block.
  3. If you want syntax highlighting, put a #!<language-name> indented with 8 spaces before your code block.

Bitbucket will respect the list numbering and you won't lose the syntax highlighting.


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?