Code block callouts/syntax highlighting

Reply
Trusted Advisor
Posts: 1,300

Code block callouts/syntax highlighting

I think it would be nice to have a code block feature to highlight inputted code examples.  Like using a block quote.  Even better if it would do sytax highlighting in the code block section!

Trusted Advisor
Posts: 1,300

Code block callouts/syntax highlighting

Custom syntax highlighting can be added to the Jive Community software, since SAS is full of Java developers it shouldn't be hard to build a plugin to the software to accomplish this...

SAS Employee
Posts: 224

Code block callouts/syntax highlighting

Thanks for making this suggestion. I'm going to follow-up on this w/ Jive and w/ our Feb folks. The more you can tell me about what you want, the better. Example?

SAS Employee
Posts: 224

Re: Code block callouts/syntax highlighting

I'm not exactly sure what you are looking for, but here is something to try.

The next time that you want to paste code, invote the Advanced Editor (look right).

Then select the blue double arrows (>>) then Syntax Highlighting then Plain. That will at least keep all of your indents.  Right now, if you want to color code, you will have to use some HTML code. 

Let me know if this gives you some of what you want. 

-Renee

Trusted Advisor
Posts: 1,300

Re: Code block callouts/syntax highlighting

Yes, that is all well and fine, however what I am asking is for you, SAS, to develop a new plugin to this software to expand the code highlighting options to include a option for SAS.  Since most of what is done on here involves sharing some code it would be nice to have the site be able to provide automatic syntax highlighting for SAS code.

Here is some code in a plain box:

data _null_;

do i=1 to 100;

  put i=;

end;

run;

Here is what I would actually want this to look like, in a SAS code box:

data_null_;

doi=1 to 100;

  puti=;

end;

run;

The point is that some development would need to be performed, either by SAS or outsourced, to implement this expanded functionality into the Jive Community Software as a plugin, which the software is capable of accepting.

SAS Employee
Posts: 224

Code block callouts/syntax highlighting

thanks for the example.  That helps.

Valued Guide
Posts: 2,175

Code block callouts/syntax highlighting

to have the color as it appears in SAS editor, deliver to these forum pages, I first copy it into office-word, then copy and paste from there into this forum message box

Trusted Advisor
Posts: 1,300

Code block callouts/syntax highlighting

Thanks Peter,

Under linux I use open office to pass through a similar result when desired, however the functionality in my opinion should just be available on this site.

Ask a Question
Discussion stats
  • 7 replies
  • 1029 views
  • 2 likes
  • 3 in conversation