From: Benny B. <Ben...@gm...> - 2009-04-29 17:23:45
|
Hi, Parts of the source that are not keywords are left along by GeSHi. You might consider using a RegeXp to match words satisfying your needs and replace them by the desired text. Note, that the span tags für Styling are added though. But I don't know if I understand your desire correctly. Given you have a source like int main (void) {...} you want to mark the "main" part as int and void are C keywords. Or am I wrong on this? For this to work, you'll need at least GeSHi 1.0.8.4rc1 Regards, BenBE. Philippe Guglielmetti schrieb: > > I'm trying to automatically "wikify" source code that is included in a > WikiMedia powered wiki to make it navigable. > > (For those interested, I modified > http://www.mediawiki.org/wiki/Extension:Include to use GeShI, and this > extension has a "wikitext" attribute that will do the job...) > > What I need is "only" to add [[identifier]] brackets around all > strings that do not satisfy any of the parsing rules... > > So, I dig into geshi code to spot the place where I could add this, > but it looks like the parse_code() function finds patterns and puts > <span ...>stuff<span> around found stuff, but I could not spot THE > place where strings that are NOT keywords might be handled. > > Can anyone help ? thanks ! > > Philippe Guglielmetti > Geneva Switzerland > www.drgoulu.com <http://www.drgoulu.com> > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > ------------------------------------------------------------------------ > > _______________________________________________ > geshi-devel mailing list > ges...@li... > https://lists.sourceforge.net/lists/listinfo/geshi-devel > |