I’m working with Palantir Foundry’s Workshop application and trying to create an unordered list in a Markdown widget. The data for this list comes from a TypeScript function-backed variable.
Despite my efforts, I’ve observed that all line breaks appear to be ignored or stripped away when the string is resolved or passed to the markdown widget.
My objective is to create a dynamically generated list without having to hard-code multiple variables and concatenate those in Workshop (line breaks between concatenated variables are preserved, leading to correct new lines). However, this is not a sustainable solution.
So far, I’ve tried the following to introduce line breaks:
- \n
- use of the br html tag
- double white spaces
Unfortunately, none of these approaches work. There’s also limited documentation on the Markdown renderer or the widget in question.
Has anyone successfully created dynamic lists or managed to preserve line breaks in this context?
Question originally asked by Falkao on Stack Overflow: Cannot create line breaks in Palantir Foundry's Markdown widget from a TS function-backed variable - Stack Overflow