Finance and operations

X++ syntax highlighting with WP-GeSHi-Highlight

While I was setting up this blog, I installed WP-GeSHi-Highlight for X++ syntax high lighting. I wrote about it here. At the end of that post I wrote that I would edit the CSS of the plugin to make it look more like the X++ Editor.

I make a few small changes, this is what I have come up with so far:


/// This job is used as an X++ sample (From Wikipedia's Microsoft Dynamics AX page)

public static void xppTest3(Args _args) { UserInfo userInfo; ttsbegin; select forupdate userInfo where != ‘Admin’ && userInfo.RecId == 1234567890; while (userInfo) { userInfo.enable = NoYes::No; userInfo.update(); next userInfo; } ttscommit; }

and this is the same code in the MorfX editor in 2012.
X++ code example

The original CSS produced this result:

I removed the dot from the line numbers and make the numbers turquoise. I also made the line height less. If you by chance use WordPress to write about X++ and have the WP-GeSHi-Highlight plugin, you are welcome to the changes I made to wp-geshi-highlight.css. The changes are small, but it just makes me feel a bit more at home with the way the code is displayed.

2 thoughts on “X++ syntax highlighting with WP-GeSHi-Highlight”

  • Hey, I am the author of WP-GeSHi-Highlight. Thanks for making cool stuff with my plugin. I love that you took your time and adjusted the CSS. It looks great, and the thing with the numbers actually is a pretty neat idea. Maybe I’ll incorporate this in the default CSS style sheet at some point. For sure I need to check on browser compatibility first.

    So, thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *