Pygments

generic syntax highlighter


Ticket #373 (closed enhancement: fixed)

Opened 8 weeks ago

Last modified 5 days ago

Prolog Lexer

Reported by: guest Owned by: thatch
Priority: major Milestone: 1.1
Component: lexers Keywords: lexer prolog
Cc: ruiandreferreira@…

Description

It would be nice to have prolog syntax highlight

Change History

Changed 8 weeks ago by gbrandl

  • status changed from new to accepted
  • component changed from docs to lexers

I agree :)

Let's see if someone writes one; I don't know Prolog well enough to do it off the cuff.

Changed 8 weeks ago by gbrandl

  • milestone set to Someday

Changed 8 days ago by thatch

  • owner changed from gbrandl to thatch
  • milestone changed from Someday to 1.1

I agree, it should be in here. I've written an initial version after consulting with a friend, which is around 95% complete on the syntax (I think there are some finicky bits with operators, and would appreciate some review). It's currently in my branch, and depends on #355 before .pl can be added to the filenames.

Changed 5 days ago by thatch

  • status changed from accepted to closed
  • resolution set to fixed

Changed 5 days ago by guest

good work. is this in head already? Using .pl is problematic but other suffixes used are .pro and .prolog

Changed 5 days ago by thatch

Yes, this is now in pygments-main. See http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/compiled.py#L1342... with #355 now fixed, it does some quick detection to tell perl from prolog files. This is done in analyse_text, which currently looks for :- but I intend to add detection of /^%/ for comments that start a line. Feel free to suggest better heuristics.

Note: See TracTickets for help on using tickets.