BenDoan / jabawiki

:notebook: A file base personal wiki
MIT License
2 stars 0 forks source link

Mixing list types is broken #22

Open bvbore opened 9 years ago

bvbore commented 9 years ago
* list
* item

or

1. list
1. item

work individually, but when both are included one after another the list type of the first wins. Breaking the two lists with text in the middle seems to work fine.

Broken:

* list
* item

1. numbered
1. list

Working:

* list
* item

Paragraph

1. numbered
1. list
BenDoan commented 9 years ago

It appears that this is standard markdown behavior. If you put those snippets into the original web tester, you get the same results. Other sites (like this one using marked) seems to render it in the more intuitive way. I'm guessing the markdown library I'm using (github.com/russross/blackfriday) is just trying to be true to the original.

A solution might be to move markdown rendering to the client with a library like marked. Go doesn't seem to have any markdown libraries that aren't direct ports from the original c.

BenDoan commented 9 years ago

Here's a mailing list thread talking about this problem. An empty code block seems to be the best proposed solution (other than fixing the implementation):

* list
* hello
* world

` ` 

1. ordered
1. list