dsl icon indicating copy to clipboard operation
dsl copied to clipboard

Multi-line Strings

Open erwanosouf opened this issue 3 years ago • 2 comments

Is there a way to have multiline strings in the DSL ?

This would allow for easier readability of long fields such as descriptions or perspectives. Also what is the proper way to introduce line breaks for rendering in such fields ?

I saw that \n seems to work, but using line breaks for the source DSL file would be great !

erwanosouf avatar Jun 03 '22 08:06 erwanosouf

The DSL parser is designed to work with line breaks, so multi-line strings are not supported I'm afraid.

simonbrowndotje avatar Jun 04 '22 10:06 simonbrowndotje

Also, struggling with readability looking at long description lines :(

aidmax avatar Aug 31 '22 06:08 aidmax

One way to make this possible without breaking the current syntax would be to allow for multiple description lines. Then, instead of using the value of the last value, concatinate them with separating \n.

Example

description "aaa"
description "bbb"
description "ccc"

This currently results in the description "ccc", but could be changed to result in "aaa**\nbbb\n**ccc"

Kaligule avatar Jan 09 '23 15:01 Kaligule

This will be available in the next version of the DSL library - you'll be able to use a backslash character to split lines.

simonbrowndotje avatar Mar 24 '23 10:03 simonbrowndotje