serendipity_event_geshi question

Creating and modifying plugins.
Post Reply
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

serendipity_event_geshi question

Post by JWalker »

Hello,

I am trying to create my version of C language color highlighting, but cannot deal with the preprocessor directives. It seems that the symbol # has special meaning for geshi.
(1) First I included #include, #else etc at the keyword table, but geshi stopped parsing when met preprocessor directive.
(2) Then I removed # and the preporocessor keywords became include, else, endif etc, thus with the same coloring as C keywords. But in that case # prevented coloring up to the end of the line.

Is the isage of # reserved for geshi and nothing can be done for preprocessor coloring ?

Regards

Ivan
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipity_event_geshi question

Post by garvinhicking »

You might want to ask the question to the geshi developers; The plugin is not specific to serendipity. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Re: serendipity_event_geshi question

Post by JWalker »

garvinhicking wrote:You might want to ask the question to the geshi developers; The plugin is not specific to serendipity. :)

Regards,
Garvin
yea, I saw a readme that says the same :) and will send a mail there.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
gizmola
Regular
Posts: 37
Joined: Mon Oct 25, 2004 11:54 pm

Post by gizmola »

Probably another plugin (the serendipity markup?) is colliding with GeSHi, and overriding its behavior. The GeSHi plugin has no issue with the preprocesor directives in C.

Try bumping the gehsi plugin up towards the top, and make sure it comes before the serendipity markup, bbcode and nl2br plugins in order.
Post Reply