Velocity Code for Excel - Removing Extra Return Lines while Formatting Rich Text Cells

Sara Wertanen
Sara Wertanen Member Posts: 5

Hi everyone, 

I'm trying to create a simple velocity export code where the rich text description in my item type needs to be exported into an Excel cell. I'm utilizing a macro for Formatting Rich Text and I cannot figure out how to remove the extra return spaces it creates: 

image

The source code in Jama for the Rich Text Description has this line in there: 

image

which causes the export to have 3 return lines between the two lines of text. When not viewing the source code in Jama (regular view), the text appears as it should without extra space.

image

Any advice on what code to add to my macro to remove that nuisance line in the export would be appreciated! Thanks!

Edit: I do have this line in my Macro already, but it doesn't appear to be working? 
    #set( $string = $string.replaceAll("(<p.*?>)*?(&nbsp;)+</p>",""))

------------------------------
Sara Wertanen
Oceaneering Entertainment Systems
FL
------------------------------