WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@gkbrk
Copy link
Contributor

@gkbrk gkbrk commented Jun 21, 2015

Tested on Firefox.

@eleweek
Copy link
Owner

eleweek commented Jun 21, 2015

Hm, that's quite non-standard, e.g. bold could be done using two underscores. I think it'd be better to use some lib, e.g. this one: https://github.com/chjj/marked

@gkbrk
Copy link
Contributor Author

gkbrk commented Jun 22, 2015

I made it so it matches **this** and __this__ for bold, *this* and _this_ for italic. This seems to be how most implementations work. I was going to use the library but adding a 1285 line library for what can be done with 2 lines of code seemed like a waste.

Since we store the markdown in the database before converting to html, we can always switch to the library if we want more markdown features.

Here's the library code in case we need the relevant lines for bold and italic text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants