1. Jesper Noehr
  2. pygments3
  3. Issues
Issue #510 new

ActionScript and MXML Syntax Highlighting

Anonymous created an issue

The current syntax highlighting for AS3 and MXML is pretty bad. Could you add specific highlighting for .as and .mxml files? In addition, if time is an issue, a stopgap option is to just map .as files to whatever you use to highlight .java files, and map .mxml files to your current .xml highlighter. The highlighting isn't perfect, but it's better than the current setup. Thanks.

Reported by guest

Comments (4)

  1. Anonymous

    Sure, here are two examples using .mxml and .as file extensions on Gist:

    http://gist.github.com/456685#file_pygments_usercontroller.as http://gist.github.com/456685#file_pygments_userform.mxml

    And the same two files with .xml and .java extensions. You can see the XML one has a lot more highlighting, though the actual AS3 code within it is one giant comment block, and the .java one has at least a bit of highlighting although it is still very sparse:

    http://gist.github.com/383055#file_quickswiz_usercontroller3.java http://gist.github.com/383055#file_quickswiz_userform2.xml

    There are actually a lot of AS3 and Flex projects on Github/Gist now, so anything you can do to help out on this will be greatly appreciated.

  2. thatch

    Could you provide examples that demonstrate how bad the lexers are? I don't see anything obvious in the lexers (although the mxml lexer does require cdata blocks for your code, which isn't documented).

  3. Log in to comment