PowerDocu icon indicating copy to clipboard operation
PowerDocu copied to clipboard

Markdown: FlowDoc table values generate as code blocks

Open Fabian-Schmidt opened this issue 1 year ago • 1 comments

Describe the bug

The Generated Markdown for FlowDoc can be converted by Markdown renderer instead of left as is.

Example is your from your Examples documents: https://github.com/modery/PowerDocu/blob/8400e0f1a96c28bd0a0166f7bd867aa418297ddf/examples/FlowDoc%20-%20Email%20me%20with%20a%20list%20of%20upcoming%20Calendar%20events/actions/Create_HTML_table-Email-me-with-a-list-of-upcoming-Calendar-events(e6b4e32f-c97d-4280-896b-57976ea698e3).md?plain=1#L23-L29

Currently the table is generated as:

| Property | Value                    |
| -------- | ------------------------ |
| test     | test                     |
| from     | @variables('BodyToSend') |
| format   | HTML                     |

Rendered result:

Property Value
test test
from @variables('BodyToSend')
format HTML

In this example GitHub chooses to format @variables as link and bold. But this is incorrect. It is not a link to a GitHub handle. Instead it is just code.

Similar issue Expression row for column Value:

https://github.com/modery/PowerDocu/blob/8400e0f1a96c28bd0a0166f7bd867aa418297ddf/examples/FlowDoc%20-%20Email%20me%20with%20a%20list%20of%20upcoming%20Calendar%20events/actions/Check_if_its_Hotel-Email-me-with-a-list-of-upcoming-Calendar-events(e6b4e32f-c97d-4280-896b-57976ea698e3).md?plain=1#L16-L22

Expected behavior

The Value column may contains html tags or other code elements. Therefore it should be rendered as code block. This avoids issues with downstream Markdown renderer and also reflects the code elements of the values.

Proposed generated table:

| Property | Value                      |
| -------- | -------------------------- |
| test     | `test`                     |
| from     | `@variables('BodyToSend')` |
| format   | `HTML`                     |

Rendered result:

Property Value
test test
from @variables('BodyToSend')
format HTML

Fabian-Schmidt avatar Aug 28 '24 08:08 Fabian-Schmidt

I've got this partially fixed. Not working in a few scenarios (e.g. compose actions that use variables), need to see what other ways there are to fix this

modery avatar Aug 29 '24 10:08 modery