Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitbucket README markdown ordered list restarts after code block

I'm using Markdown for my README.md on Bitbucket and realize my ordered list restart to 1 after a code block. Here is an example of my text:

1. Download VirtualBox
2. Download Vagrant
3. Clone the repository

> git clone URL

4. Go to repository folder

> cd /my_repo

5. Setup your dev environment

The number 4 and 5 are both 1. in my README, which is not what I want. Maybe should I use the `` instead? The result won't be the same style but if my list keep the numbering it would be better at least.

Any solutions?

like image 816
Dachmt Avatar asked Nov 13 '13 19:11

Dachmt


1 Answers

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.)

like image 109
Jongware Avatar answered Sep 29 '22 07:09

Jongware