Skip to content

fix: escape pipe characters in markdown table cells (fixes #832)#1117

Open
barry0451 wants to merge 2 commits intodatacontract:mainfrom
barry0451:fix/issue-832-markdown-table-columns
Open

fix: escape pipe characters in markdown table cells (fixes #832)#1117
barry0451 wants to merge 2 commits intodatacontract:mainfrom
barry0451:fix/issue-832-markdown-table-columns

Conversation

@barry0451
Copy link
Copy Markdown
Contributor

When extra field values (e.g., config, customProperties) contain list-of-dict content with embedded pipe characters, the generated markdown table structure breaks (parser sees more columns than expected).

This fix escapes | as | when rendering list-of-dict extra field values inside table cells in extra_to_markdown().

Fixes #832

@barry0451 barry0451 force-pushed the fix/issue-832-markdown-table-columns branch from 7f698be to 749092a Compare April 1, 2026 23:49
@barry0451 barry0451 force-pushed the fix/issue-832-markdown-table-columns branch from 749092a to 858a474 Compare April 1, 2026 23:52
jschoedl

This comment was marked as outdated.

parts.append(array_to_markdown(value_extra))
raw = array_to_markdown(value_extra)
if is_in_table_cell:
raw = raw.replace("\n", "<br />")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not replace pipes here as well? Same for line 381 and 384.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown export is broken, tables don't have the correct amount of columns

2 participants