GeSHi plugin

Started by Jeff, January 26, 2009, 09:29:22 AM

Previous topic - Next topic

Jeff

I've written a plugin for GeSHi for newlisp for those who use it to colorize code on their websites. It colorizes code using the same colors as the newlisp colorizer cgi and adds links to documentation for functions.



http://www.artfulcode.net/projects/">http://www.artfulcode.net/projects/
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

cormullion

#1
I spent some time persuading the Geshi project guys to include a newLISP file as part of the basic install. The file is basically a merge of the two files I had from Lutz and Jeff, with corrections supplied by Benny at Geshi. Existing Geshi users should probably carry on using their own versions, but at least it will be in subsequent revisions by default.



And let it be noted here that http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants">I didn't actually do any original work myself ... :)

Jeff

#2
Thanks. That will make my life easier every time the wordpress geshi plugin gets an update :)



And I am no giant. I am under 6 foot. I don't even know what, "fee fie foe fum," means!
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

xytroxon

#3
Quote from: "Jeff"And I am no giant. I am under 6 foot. I don't even know what, "fee fie foe fum," means!


I believe it has something to do with the peculiar olfactory quality of British men's circulatory system's liquid state hemoglobin transport fluid ;)



-- xytroxon
\"Many computers can print only capital letters, so we shall not use lowercase letters.\"

-- Let\'s Talk Lisp (c) 1976

Lutz

#4
QuoteThe file is basically a merge of the two files I had from Lutz and Jeff


Where can I find the merged version? I was looking on various GeSHI places but couldn't find anything.

cormullion

#5
Currently I believe it's in the development trunk (whatever that means):



http://geshi.svn.sourceforge.net/viewvc/geshi/trunk/geshi-1.0.X/src/geshi/newlisp.php?revision=2189&view=markup">//http://geshi.svn.sourceforge.net/viewvc/geshi/trunk/geshi-1.0.X/src/geshi/newlisp.php?revision=2189&view=markup



and the sample code I pointed them to is



http://geshi.svn.sourceforge.net/viewvc/geshi/branches/MISC_STUFF/coderepo/newlisp/">//http://geshi.svn.sourceforge.net/viewvc/geshi/branches/MISC_STUFF/coderepo/newlisp/



All this scm stuff is too much for me to understand.



BTW: most of the edits I made were to make the file conformant, cos Benny told me it failed the entrance test...


Validating language file for 'newlisp' ... Failed

  1. NOTICE Language file contains unescaped tabulator chars (probably
     for indentation)!
  2. WARNING Language file does not contain a specification of the
     copyright!
  3. WARNING Language file does not contain a specification of the
     release version!
  4. WARNING Language file does not contain a specification of the date
     it was started!
  5. WARNING Language file does not state that it belongs to GeSHi!
  6. WARNING Language file does not state that it is a language file
     for GeSHi!
  7. WARNING Language file does not state that it is provided under the
     terms of the GNU GPL!
  8. ERROR Language file contains no $language_data['COMMENT_MULTI']
     structure to check!


so those were fixed Lutz's and Jeff's work were merged. Perhaps further changes could be done in the right open source way...

Lutz

#6
from the PHP newLISP GeSHI syntax file:


'COMMENT_MULTI' => array('[text]' => '[/text]', '{' => '}'), // also used for strings


probably this should go into the QUOTEMARKS section instead of COMMENT_MULTI. Or perhaps there is a QUOTEMARKS_MULTI ?. Perhaps Bebe can help? Anyways, the way its done now, it works, when colors are chosen right.