Pygments

generic syntax highlighter


Ticket #424 (closed enhancement: fixed)

Opened 14 months ago

Last modified 8 months ago

ColdFusion (CFML) language support

Reported by: guest Owned by: thatch
Priority: minor Milestone: 1.3
Component: lexers Keywords:
Cc: priest@…

Description

I'm currently setting up ReviewBoard? (which uses Pygments for it's diff view) and am running into issues when trying to view ColdFusion? code.

Any plans on adding that in the near future?

Attachments

cfm-v1.diff (6.5 kB) - added by thatch 12 months ago.

Change History

Changed 14 months ago by guest

  • component changed from docs to formatters

Changed 13 months ago by thatch

  • priority changed from major to minor
  • component changed from formatters to lexers
  • milestone set to Someday

Could you provide an example file?

Changed 12 months ago by guest

In actual fact ColdFusion? code is very much like HTML... many of the original coldfusion commands are basically HTML like, e.g. <cfoutput></cfoutput> with some special characters like # being used to determine variables to be displayed (so for example:

<cfset myText = "This text"> <cfoutput>#myText#</cfoutput>

Lots of info and examples of ColdFusion? available here: http://www.learn-coldfusion-tutorial.com/

It also has it's own scripting language (which goes between <cfscript></cfscript> tags and is very much like javascript.

It uses three main file extensions, .cfm or .cfml and .cfc - in actual fact a combination of the existing HTML lexer, and the javascript lexer, with additional support for #thisvariable# highlighting would go a long way to solving the ColdFusion? one!

Changed 12 months ago by thatch

Changed 12 months ago by thatch

A *very* rough version is in the attachment. The keywords-allowed-as-tags were discovered experimentally. Remaining to do:

  1. Integrate the full list of tags
  2. Integrate the full list of functions (not as big a deal, anything with a paren will highlight as a function, just won't be marked as a builtin).
  3. Fix the single quote with tag within parsing issue (see tests/examplefiles/evil.cfm).
  4. Figure out whether any of the file extensions imply xml, or if they're all html.

Changed 11 months ago by thatch

  • milestone changed from Someday to 1.2

Initial version in [472aac53fd04] in my branch, without the evil testfile. Most of my testing is done with the entire cfwheels repo, and the only things that didn't highlight are in evil.cfm in the attached diff.

A patch is welcome if anyone feels like integrating the full lists. I'm calling it good for now. Review welcome on the mimetypes or extensions, I'm not very familiar with coldfusion.

Changed 11 months ago by thatch

  • owner changed from gbrandl to thatch
  • status changed from new to accepted

Changed 10 months ago by guest

Looks good to me... certainly better than black and white. :)

Changed 10 months ago by guest

Oh - if anyone does want to integrate the tags and functions would go with CF8 at least (version 7 was linked above). Version 9 is just out, though online docs not there right now.

ColdFusion 8 Tags

ColdFusion 8 Functions

Changed 8 months ago by gbrandl

  • milestone changed from 1.2 to 1.3

Changed 8 months ago by gbrandl

  • status changed from accepted to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.