proper syntax for code blocks in markdown

102 views
Skip to first unread message

Shahin Azad

unread,
May 8, 2013, 3:55:34 PM5/8/13
to nikola-...@googlegroups.com
I just imported my blog and I want to have `syntax-highlighting` on my codes. In restructuredText posts, codes are colored and everything is fine. But with markdown (imported from wordpress) by this syntax:

```python
print 'hi!'
```
will just show the code in a block and not highlighted. The code mark up is separated, but there is not any default color style on it. How can I have color on it?

Roberto Alsina

unread,
May 8, 2013, 4:07:24 PM5/8/13
to nikola-...@googlegroups.com
It seems to work for me.

I would advise you to examine the CSS and the HTML and see if something
is looking strange. You should have classes like "o" and "n" in the code,
and those should match code.css.

```python
a="foo"
```

shows "foo" in color #ba2121 and chrome tells me it's picking that from
line 28 in code.css


Shahin Azad

unread,
May 8, 2013, 5:57:09 PM5/8/13
to nikola-...@googlegroups.com
I'm sorry that was my fault! I had a typo in my code :-)
Reply all
Reply to author
Forward
0 new messages