How do you escape pipe character in bitbucket markdown? - special-characters

I would like to add the following to a bitbucket wiki:
Key | Description |Default |
:-----------|:----------------------------------------------|:--------------|
env |Execution context {development|test|production}|development |
Markdown has a backslash escape for many characters, but not pipe (|). I saw one solution using {development|test|production} but this does not work as you can't use html in bitbucket markdown.
Has anyone found a way to include the pipe character in cell contents in a markdown table on bitbucket?

Bitbucket's Markdown might not support HTML, but it does support Unicode. Inside table cells you can use another character that looks like the pipe character, e.g. ⎮ (0x23AE, INTEGRAL EXTENSION):
Key | Description |Default |
:-----------|:----------------------------------------------|:--------------|
env |Execution context {development⎮test⎮production}|development |
This character won't trigger Bitbucket's Markdown table syntax.

Related

What is the correct way to use a pipe (|) in an inline code block in a table in Markdown?

In a table in Markdown, a pipe character (|) is used to separate columns in a table.
However, it's also a pretty common character in code, especially as the bitwise OR operator.
When writing inline code blocks in a Markdown table, how should the pipe be escaped, if at all?
There are two candidate methods for writing a pipe in a literal.
This is accepted and rendered correctly by Pandoc and StackOverflow, but not by GitHub:
| My Table! |
| ------------------ |
| behold, a pipe: `|`|
This is accepted and rendered correctly by GitHub, but not by Pandoc or StackOverflow:
| My Table! |
| ------------------- |
| behold, a pipe: `\|`|
It seems to be unclear as to whether the pipe needs to be escaped.
Does the Markdown specification describe whether the pipe must be escaped?
There is no "correct" way because Markdown has no standard or official specification and its original creator rejected efforts to standardize it or write a spec(1, 2). It turned into an ugly fight. The end result was the balkanization of Markdown.
But the world is converging around CommonMark as standard. Even GitHub Flavored Markdown (GFM) is now a superset of CommonMark.
Pandoc, btw, supports multiple variants of Markdown. You should be able to force it to work the same as GitHub.
StackOverflow is supposed to use CommonMark (one of its founders, Jeff Atwood, was one of the lead people behind CommonMark). But since CommonMark doesn't include table syntax, it looks SO's implementation deviated from GitHub's.

How to escape '|' in emacs's org-mode? [duplicate]

I've got a table in Emacs org-mode, and the contents are regular expressions. I can't seem to figure out how to escape a literal pipe-character (|) that's part of a regex though, so it's interpreted as a table-cell separator. Could someone point me to some help? Thanks.
Update: I'm also looking for escapes for a slash (/), so that it doesn't trigger the start of an italic/emphasis sequence. I experimented with \/ and \// - for example, suppose I want the literal text /foo/ in a table cell. Here are 3 ways of attempting it:
| /foo/ | \/foo/ | \//foo/ |
In LaTeX export, that becomes:
\emph{foo} & \/foo/ & \//foo/
So none of them is the plain /foo/ I'm hoping for.
\vert for the pipe.
Forward slashes seem to work fine for me unescaped when exporting both to HTML and PDF.
Use a broken-bar character, “¦”, Unicode 00A6 BROKEN BAR. This may or may not work for your specific needs, but it’s a good visual approximation.
You could also format the relevant text as verbatim or code:
Text in the code and verbatim string is not processed for Org mode
specific syntax; it is exported verbatim.
So you might try something like =foo | bar= (code) or foo ~|~ bar (verbatim). It does change the output format, though.

How to escape '|" character into an org-mode table

I am building some tables in org-mode and I need to enter "||" into the table (for the logical OR command) and nothing I try turns the two characters off as table constructors.
I've tried single quotes, double quotes, backticks and prefacing them with '\'. I've also tried every permutation of using ':=' to get a literal string and they don't work.
// Tony Williams
Depending on what you want to do with the output of the table, you could use alternative unicode characters that look like vertical pipes (or double vertical pipes). Examples:
This is the pipe character written twice (as for logical OR):
||
Those are similar (or not too different) looking unicode characters
‖ - ¦¦ - ❘❘
Of course, this won't work for you if you are not just interested in the looks (but escaping pipes would not work either).
See here more unicode characters you might like better than those 3 above
It turns out that you can use HTML entities in org-mode tables for output via pandoc.
\vert{} doesn't work but I went to the table pointed to by MrSpock and tried the HTML entity and the output when run through pandoc was perfect. || gives me '||'. I also tested a few other HTML entities and they also worked fine.
Well, if the goal is to export your notes, then
$\lvert\mathbb{N}\rvert$
would be an equivalent of
$|\mathbb{N}|$
Character is: \vert
Example: a \vert\ b -> a | b

Postgres using FOREIGN TABLE and data include "\"

My text file look like:
\home\stanley:123456789
c:/kobe:213
\tej\home\ant:222312
and create FOREIGN TABLE Steps:
CREATE FOREIGN TABLE file_check(txt text) SERVER file_server OPTIONS (format 'text', filename '/home/stanley/check.txt');
after select file_check (using: select * from file_check)
my console show me
homestanley:123456789
c:/kobe:213
ejhomeant:222312
Anyone can help me??
The file foreign-data-wrapper uses the same rules as COPY (presumably because it's the same code underneath). You've got to consider that backslash is an escape character...
http://www.postgresql.org/docs/9.2/static/sql-copy.html
Any other backslashed character that is not mentioned in the above table will be taken to represent itself. However, beware of adding backslashes unnecessarily, since that might accidentally produce a string matching the end-of-data marker (.) or the null string (\N by default). These strings will be recognized before any other backslash processing is done.
So you'll either need to double-up the backslashes or perhaps try it as a single-column csv file and see if that helps

Escape pipe-character in org-mode

I've got a table in Emacs org-mode, and the contents are regular expressions. I can't seem to figure out how to escape a literal pipe-character (|) that's part of a regex though, so it's interpreted as a table-cell separator. Could someone point me to some help? Thanks.
Update: I'm also looking for escapes for a slash (/), so that it doesn't trigger the start of an italic/emphasis sequence. I experimented with \/ and \// - for example, suppose I want the literal text /foo/ in a table cell. Here are 3 ways of attempting it:
| /foo/ | \/foo/ | \//foo/ |
In LaTeX export, that becomes:
\emph{foo} & \/foo/ & \//foo/
So none of them is the plain /foo/ I'm hoping for.
\vert for the pipe.
Forward slashes seem to work fine for me unescaped when exporting both to HTML and PDF.
Use a broken-bar character, “¦”, Unicode 00A6 BROKEN BAR. This may or may not work for your specific needs, but it’s a good visual approximation.
You could also format the relevant text as verbatim or code:
Text in the code and verbatim string is not processed for Org mode
specific syntax; it is exported verbatim.
So you might try something like =foo | bar= (code) or foo ~|~ bar (verbatim). It does change the output format, though.