Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nested bullets with code blocks in markdown for Github

I have the following text inside a Markdown file:

- In order to free :

    - Items no rateados por exp: 

```javascript
db.items.find({"detail.rc": {$lt: 20}, "dst": "v"}).count()
db.items.find({"detail.rc": {$lt: 20}, "dst": "b"}).count()
```

    - Items no rateados por exp y sin rat:

```javascript
db.items.find({"detail.rc": {$lt: 20}, "dst": "v"}).count()
db.items.find({"detail.rc": {$lt: 20}, "dst": "b"}).count()
```

It looks like the image below when parsed, where green arrows suppose to have same level bullet, but the second one is highlighted. I just want it as the first one. How can I do that?

Parsed image

like image 643
borjagvo Avatar asked Jun 12 '15 10:06

borjagvo


People also ask

How do you add bullet points in Markdown?

Bullet point lists can be created by starting each line with an asterisk followed by a space before the content of the bullet point. Note that the space is important and should not be forgotten.

How do I add Codeblocks in Markdown?

To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input: This is a normal paragraph: This is a code block. A code block continues until it reaches a line that is not indented (or the end of the article).

How do I add bullets in GitHub?

You can create bullet points in an unordered list in markdown format using an asterisk “*” at the beginning of the line.

How do I add a code block to GitHub?

You can create fenced code blocks by placing triple backticks ``` before and after the code block. We recommend placing a blank line before and after code blocks to make the raw formatting easier to read.


1 Answers

You just need to indent your code blocks with 4 spaces.

like image 114
JB Nizet Avatar answered Sep 26 '22 13:09

JB Nizet