Here are my few trials below:
Table 1: There is a pipe ( |
) character inside Table Cell. It can't display properly.
| Alias | Command | What to Type |
| --- | --- | --- |
| git cleanup
| git branch --merged | grep -v '*' | xargs git branch -d
| git config --global alias.cleanup "!git branch --merged | grep -v '*' | xargs git branch -d"
|
Table 2: There is a pipe ( |
) character that escape with a HTML Entity ( |
). Within ` sign, all HTML Entities will output ASIS which is not what I want.
| Alias | Command | What to Type |
| --- | --- | --- |
| git cleanup
| git branch --merged | grep -v '*' | xargs git branch -d
| git config --global alias.cleanup "!git branch --merged | grep -v '*' | xargs git branch -d"
|
Table 3: When I strip the ` sign, it works, but not what I want. Using this, we also need to escape the *
symbol to |
.
| Alias | Command | What to Type |
| --- | --- | --- |
| git cleanup
| git branch --merged | grep -v '*' | xargs git branch -d | git config --global alias.cleanup "!git branch --merged | grep -v '*' | xargs git branch -d" |
Table 4: This is the best solution I can figure out. It's just not perfect!
| Alias | Command | What to Type |
| --- | --- | --- |
| git cleanup
| git branch --merged
| grep -v '*'
| xargs git branch -d
| git config --global alias.cleanup "!git branch --merged
| grep -v '*'
| xargs git branch -d"
|
Is there a better way to show |
sign in the Table Cell with Inline Code syntax in a Markdown document?
I found the right way to escape pipe character. 😃
Table 5: Extreme solution! Ref: GitHub Flavored Markdown Spec - Example 193
| Alias | Command | What to Type |
| --- | --- | --- |
| git cleanup
| git branch --merged \| grep -v '*' \| xargs git branch -d
| git config --global alias.cleanup "!git branch --merged
| grep -v '*' \| xargs git branch -d"
|
I didn't get it, how did you manage?
I don't see how the example linked solved it and I cannot see the markdown source of your working table in the last comment, only the rendered result :/
(showing the markdown with <pre>
tags around it)
Name | Type | Default ------------ | ------------ | ----------------- xxx | xxx | `/,|\.|\:|\s/`
outputs:
Name | Type | Default
------------ | ------------ | -----------------
xxx | xxx | /,|\.|\:|\s/
Ok I see now from this discussion in stackoverflow you should escape the pipe characters with a leading backslash \
:
/,\|\.\|\:\|\s/
Name | Type | Default
------------ | ------------ | -----------------
xxx | xxx | /,\|\.\|\:\|\s/
@yairEO That's a backslash, not a slash!
Most helpful comment
@yairEO That's a backslash, not a slash!