I think this module does an amazing job, but the HTML output is rather awkward.

Is there a reason you use inline 'style' instead of the 'class' attribute?

Books have been written arguing against the use of inline style...

Comments

soxofaan’s picture

Status: Active » Fixed

Go to GeSHi admin page,
in fieldset "Styling, layout and CSS", set the option "CSS mode for syntax highlighting" to your liking

(inline styling is less likely to cause setup troubles, that's why it's the default)

jjalocha’s picture

Status: Fixed » Active

Ooops, sorry. I missed that! <blush/>

But the <pre> and <div> elements still keep using a 'style' attribute:

<p><div class="geshifilter"><pre class="python geshifilter-python" style="font-family:monospace;">
<p><div class="geshifilter"><div class="python geshifilter-python" style="font-family:monospace;">

I am not sure, if there's a reason for this.

soxofaan’s picture

I had difficulties with reproducing this, the style attribute only shows up for the [div] mode.

This appears to be a bug in the GeSHi library,
not something that can be solved in the GeSHi filter module (which is basically a wrapper around the library).

(for clarity: I am using GeSHi library version 1.0.7.22 here)

If you care about this, you could file a bug in the GeSHi library bug tracker

jjalocha’s picture

Thank you for the clarification.

I am using GeSHi 1.0.8.4, and I reported the bug at SourceForge.

soxofaan’s picture

Title: Use class instead of style » GeSHi lib bug: still inline CSS when in class mode
Version: 6.x-1.2 » 6.x-1.x-dev
Component: Code » Filtering
Priority: Normal » Minor
Status: Active » Postponed

thanks,
nothing more to do here then

jjalocha’s picture

Status: Postponed » Fixed

saxofan, thank you very much for your excellent and timely support!

Everything went also well with the people from the GeSHi project, and they have fixed the problem already in SVN. So we should have the correct behavior in the next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.