RstPreview icon indicating copy to clipboard operation
RstPreview copied to clipboard

Syntax highlight doesn't work

Open Suor opened this issue 12 years ago • 6 comments

It says 'Cannot analyze code. Pygments package not found.'

Suor avatar Jun 07 '13 02:06 Suor

You'll need to install Pygments - possibly in the same method you installed docutils. What platform are you using?

d0ugal avatar Jun 10 '13 08:06 d0ugal

I've already installed it and it stopped complaining, but I still don't see syntax highlight.

Inspecting page, I see markup, but there's are no styles applied to it.

I use Opera on Linux 10.06.2013 16:18 ÐÏÌØÚÏ×ÁÔÅÌØ "Dougal Matthews" [email protected] ÎÁÐÉÓÁÌ:

You'll need to install Pygments - possibly in the same method you installed docutils. What platform are you using?

Reply to this email directly or view it on GitHubhttps://github.com/d0ugal/RstPreview/issues/18#issuecomment-19185817 .

Suor avatar Jun 10 '13 08:06 Suor

Ah - of course. We need to include one of the style sheets that works with Pygments. There are a number of them around online, for example: https://github.com/richleland/pygments-css - then it just needs to be included like the other CSS.

d0ugal avatar Jun 10 '13 08:06 d0ugal

If you fancy having a go at this that'd be great. Otherwise I can try and do it at some point.

d0ugal avatar Jun 10 '13 08:06 d0ugal

I tried adding one of that css files here https://github.com/Suor/RstPreview/commit/cef72fe127d627269bdaed59ac941da11fe99701 But it seems that their styles don't match ones used in the markup generated by RstPreview: there are short class names in css (c, err, k) and long ones in the markup (comment, error, keyword).

Suor avatar Jun 11 '13 06:06 Suor

Hmm, strange. I'll try and have a look over the next few days.

d0ugal avatar Jun 11 '13 13:06 d0ugal