Display dynamic color groovy output ?

sidhant tiwari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 17, 2018

I am printing red and green color in groovy script, its works fine in console but throws error when the groovy script is added to confluence as below

 

Error: [com.ctc.wstx.exc.WstxLazyException] Illegal character ((CTRL-CHAR, code 27)) at [row,col {unknown-source}]: [1,321] 

 

 

String LIGHT_RED       = "\u001B[1;33m"

static String color(String text, String ansiValue) {
    ansiValue + text
}

println color("sample", LIGHT_RED)

 

1 answer

0 votes
M Amine
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2021

I would suggest using regular HTML and CSS

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events