'|' in the code block inside table

Steps to reproduce

Create a note with the following content:

| foo | bar |
| --- | --- |
| `raw | character` | baz1 |
| `escaped \| character` | baz2 |

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

To have at least one of the rows render the first column correctly as first | second

Actual result

screenshot_1724877009

Not escaping the character results in | in the code block being interpreted as part of the table, but escaping it results in the escape character also being rendered in the view mode, meaning there doesn’t seem to be an obvious way to display the | inside a table

Environment

SYSTEM INFO:
	Obsidian version: v1.6.7
	Installer version: v1.6.7
	Operating system: #1 SMP PREEMPT_DYNAMIC Mon, 19 Aug 2024 05:13:57 +0000 6.6.47-1-lts
	Login status: not logged in
	Insider build toggle: off
	Live preview: off
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

There doesn’t seem to be a consistent way this is implemented in other applications. I’ve encountered this while reading the GitBook of DataView plugin, and their source uses the first row variant. Meanwhile in VSCode first one also glitches out the table, but second one renders correctly and hides the escape character before the |

There is an existing thread about this.

There might be additional workarounds or suggestions in the discussion. There is one link where a workaround is suggested to use <code>\|</code>

Sorry, i tried looking, but didn’t find it. Could you link it?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.