Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any syntaxhighlighter for SAS?

I need to post SAS code on my website. However, if I do write my HTML to highlight SAS cod it would take me a long time.

How can I transform the SAS code into nice looking HTML counterpart?

like image 266
CHEBURASHKA Avatar asked Aug 03 '13 14:08

CHEBURASHKA


1 Answers

I just discovered that Gist actually supports SAS Syntax highlighting!

This is what you see if you create a hello_world.sas file on Gist.

enter image description here

If you'd like to embed SAS codes into (say) a Wordpress.org blog article (like myself), the way I usually do this is:

  1. Create a Markdown file on Gist. For example, see this Gist Markdown file that I created ). Notice that an "embed link" is created for you:

enter image description here

  1. In your Wordpress.org website, already have the plugin oEmbed Gist already installed.

  2. When you create a new blog post in Wordpress, in the body field (where you'd normally type out content of your blog post), simply copy and paste the Gist embedded link into the the body.

enter image description here

  1. Publish that blog post and you shall see it renders beautifully!

enter image description here

(alternatively, if you wish to write your Wordpress blog post normally, and embed multiple Gist SAS codes, just simply save the gist files as .sas files (instead of one .md file), and embed multiple embed URLs (corresponding to each code blogs).

More info see this stackoverflow forum - where I learnt about the awesome Gist and Wordpress Gist oEmbed combo!

like image 59
Atlas7 Avatar answered Oct 13 '22 01:10

Atlas7