herophant
herophant

Reputation: 680

Why does list syntax after a header treat the contents as code?

I am relatively new to markdown but when I type in the following:

# Here is a header
    * here is some stuff about the header
    * some more stuff

And this gives me something like: enter image description here when I put it into github.

Why is this happening?

Upvotes: 0

Views: 14

Answers (1)

user128511
user128511

Reputation:

Because you put 4 spaces in front of the asterisks. 4 leading spaces at the current indent level = code block. Remove the spaces (or put less then 4).

It's the same on stackoverflow

# Here is a header
    * here is some stuff about the header
    * some more stuff

produces

Here is a header

* here is some stuff about the header
* some more stuff

where as

# Here is a header
* here is some stuff about the header
* some more stuff

produces

Here is a header

  • here is some stuff about the header
  • some more stuff

as does

# Here is a header
   * here is some stuff about the header
   * some more stuff

--

Here is a header

  • here is some stuff about the header
  • some more stuff

Upvotes: 1

Related Questions