Syntax highlighting for code snippets

This forum is for all Flare issues not related to any of the other categories.
Post Reply
RiverMonster
Sr. Propeller Head
Posts: 148
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Syntax highlighting for code snippets

Post by RiverMonster »

Love the new feature for adding code snippets such that they are automatically syntax highlighted.
However, I would like to be able to do this for HL7 code and there is no option in the dropdown Language list for this.

So I was wondering if there is a way to either add a new language to the list based on your own custom syntax highlighting definitions or if there is a way to edit the definitions of another language in the list (e.g. I never use MATLAB code so I could edit the definitions for this language to make it work for HL7).
Guessing the answer to both questions is no, but here's hoping...

BTW this would be for PDF outputs. I have seen some posts from Flare's pre code snippet days discussing how to do this with 3rd party tools like Prism but if I understand correctly this would only work for browser outputs.
Thanks
Adrian
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Syntax highlighting for code snippets

Post by Nita Beck »

Flare doesn't offer what you're after. One can't add a new language and define its highlighting rules, nor can one edit an existing language's highlighting rules. This is something I'd like, too, and I've submitted a feature request. I suggest you do so, too.

Perhaps others have a workaround for now. I personally can't offer on.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Harben1949
Jr. Propeller Head
Posts: 2
Joined: Tue Sep 07, 2021 8:25 am

Re: Syntax highlighting for code snippets

Post by Harben1949 »

Harben 1949 wrote: Re the new feature regarding highlighting code snippets. I would like to change the highlight colors to match other projects I am working on. Tech support has just replied that this feature enhancement is under consideration. I hope it will be realized soon as I think it would make a great feature even better!
Harben 1949 :idea:
jeffm5
Jr. Propeller Head
Posts: 1
Joined: Thu Apr 28, 2022 6:29 am

Re: Syntax highlighting for code snippets

Post by jeffm5 »

Flare Newbie here. I don't think this possible but thought I'd ask this esteemed group. Is it possible to change the code snippet color of the syntax highlighting i.e from blue to orange? I can't seem to find anything in the CSS code for the Madcap/CodeSnippetBody. My business partner and our developers don't like the coloring. Any good workarounds out there if you can't do systemically?

Thank you!
Jeff
trent the thief
Propellus Maximus
Posts: 613
Joined: Wed Feb 01, 2006 6:21 am
Location: Off in the dark....

Re: Syntax highlighting for code snippets

Post by trent the thief »

Nita Beck wrote:Flare doesn't offer what you're after. One can't add a new language and define its highlighting rules, nor can one edit an existing language's highlighting rules. This is something I'd like, too, and I've submitted a feature request. I suggest you do so, too.
Done. Love the highlighting, but sure wish I could add to it.
Trent.

Certifiable.

Image

umm...
I meant MAD Certified.

Official Propeller Beanie Owner :-)

:flare: Are you on Flare's Slack channels? PM me for an invitation! :flare:
Post Reply