maciakl / MarkdownJournal

Plain text journaling with Markdown and Dropbox on the Sinatra platform.
http://markdownjournal.com
46 stars 7 forks source link

Syntax highlighting #17

Open NorthrupAnthony opened 7 years ago

NorthrupAnthony commented 7 years ago

Is there a way you could implement/allow syntax highlighted code blocks using the triple backtick syntax? Only allowing the indented code blocks makes typing stuff much more annoying because I have indent each line individually (or use a regex replace on notepad++, but still).

Example:

``` C

include

int main() { printf("Hello, World.\n"); return 0; } ```

Results in: (Supported by github)

#include <stdio.h>
int main() {
    printf("Hello, World.\n");
    return 0;
}
NorthrupAnthony commented 7 years ago

If you need it to be ruby compatible, here's a gem that will help.