Arbitrary syntax highlight

0 votes
asked Jan 22, 2023 in Wanted features by Buford and Bernardo

@startuml

keyword "DateTime" {color:teal;}

keyword "double" {color:blue;}

start

:Some block

====

|=field|type|

|StartDate|DateTime|

|Duration|double|

;

stop

@enduml

keyword - means that all occurences of a keyword are postprocessed with regexp and colored.

commented Jan 22, 2023 by The-Lu (65,440 points)

Hello B., and all,

  • Could you precise your issue?

About syntax highlighting:

  • It is not due to PlantUML himself, but rather on the plugin you use...

Then:

  • What plugin are you using?
  • Ask perhaps the question directly on the plugin discussion pages?

Regards,
Th.

commented Jan 25, 2023 by Buford and Bernardo

The-Lu ,Thanks for the answer! This is exaclty what I need!!!!

1 Answer

+1 vote
answered Jan 23, 2023 by The-Lu (65,440 points)

Hello B., and all,

Here is an example using preproc. variable, as:

@startuml
!DateTime="<color:teal>DateTime"
!double="<color:blue>double"

start
:Some block
====
|= field| type|
| StartDate| DateTime|
| Duration| double|;
stop
@enduml


Just avoid to use any PlantUML language keyword...
Enjoy,

Regards,
Th.

...