I have a table with description of commands and then the command itself.
Description
Command
List all configurations
ansible-config list
Shows the current config file being used
ansible-config view
Shows the current settings being used
ansible-config dump
Search for a variable and its assigned value
`ansible-config dump
The issue I am having is that, in the last line of the table (which was created by doing right click > insert table) is inserting a \ in before the | in the code line.
ansible-config dump | grep GATHERING
Things I have tried
Apologies if this has already been answered. I searched “Pipe table”, “Table adding \ before | in code line or block” and a couple permutations like it.
I tried adding a \ before the | but it does not behave like I expect it
I tried doing a code block instead of surrounding it in single ` s
I tried copying the below and pasting it into the column to no avail as it still inserts the : ansible-config dump | grep VARIABLENAME
It doesn’t seem like the table is formatting the same way it is in my Obsidian document. I have attached a screenshot to show what I mean. I am not inserting the \ and it is appearing on its own. I am thinking there should be a way to escape the pipe character, but I am unsure how.
I don’t know what the recommended solution is for the issue you are facing, but in a local test the following sort of works. Suitable enough for your needs?
| _**Description**_ | _**Command**_|
| - | - |
| List all configurations|`ansible-config list`|
| Shows the current config file being used|`ansible-config view`|
| Shows the current settings being used|`ansible-config dump`|
| Search for a variable and its assigned value|`ansible-config dump` \| `grep GATHERING`|
| _**Description**_ | _**Command**_ |
| -------------------------------------------- | ------------------------------------------------------ |
| List all configurations | `ansible-config list` |
| Shows the current config file being used | `ansible-config view` |
| Shows the current settings being used | `ansible-config dump` |
| Search for a variable and its assigned value | <code>ansible-config dump | grep GATHERING</code> |
| | pipe | |
| _**Description**_ | _**Command**_|
| - | - |
| List all configurations|`ansible-config list`|
| Shows the current config file being used|`ansible-config view`|
| Shows the current settings being used|`ansible-config dump`|
| Search for a variable and its assigned value|`ansible-config dump │ grep GATHERING`|