Showing literal backticks in posts here
-
@sierdzio
Hello```
world!Oh, OK! I promised a "bonus point" for that, but I think the need to put the spaces in deducts from that? :)
Going back to tildes/block, you didn't answer:
Oh! Are triple-tildes like triple-ticks for code blocks then?
-
@JonB said in Showing literal backticks in posts here:
@sierdzio
Hello```
world!Oh, OK! I promised a "bonus point" for that, but I think the need to put the spaces in deducts from that? :)
Going back to tildes/block, you didn't answer:
Oh! Are triple-tildes like triple-ticks for code blocks then?
Seems so.
int nothing = 0; function();
int nothing = 0; function();
First block is created with tildes, second with backticks.
-
@JonB said in Showing literal backticks in posts here:
@sierdzio
And where is this documented...? :)Dunno, it was just a guess :-)
It seems to be part of Markdown: https://sourceforge.net/p/tilde/wiki/markdown_syntax/#md_ex_code but most guides for MD do not mention it. Some claim it's for preformatted text and not for code.
Thanks, great answers, I'll try to remember the two ways for block- or in-line.
There seems to be another way (since NodeBB supports Markdown syntax): Use TWO backticks if you want to use backticks inside of a block.
like `this`, see?
It's described in https://www.markdownguide.org/basic-syntax/#code
-
@sierdzio
Just resurrecting this after 4 years :)You get a double-extra-bonus point if you can find anyway of showing a line of
```
(triple-backtick) inside a multiline code blockmulti line show line of 3-backticks here, how? for example, ` ``` ` can't be used it shows too many multi line show line of 3-backticks here, how? multi line
So that one can show exactly what users can type to do multiline code blocks.
Reason is https://forum.qt.io/topic/156437/ui-detect-mouse-event-on-objects/16, where you can see I cannot get my
```
lines inside the code block as I would like.:)
-
Testing something:
``` ```
\```
-
Hello ``` World ``` triple single backticks ```
Edit:
Like this @JonB ?Since NodeBB uses markdown language and the "blocks" / paragraphs of text or code can be "cascaded" (wanky description from my side XD ) , you can choose four single backticks for your code style and then three single ones can be rendered inside properly even without escaping them.
Not sure if bug or feature :3
But it seems to work -
@Pl45m4 said in Showing literal backticks in posts here:
you can choose four single backticks for your code style and then three single ones can be rendered inside properly even without escaping them.
Ohhhh! And where did you find that documented?!
abc ``` def
Which I wrote as:
```` abc ``` def ````
!! ;-)
-
@JonB said in Showing literal backticks in posts here:
Ohhhh! And where did you find that documented?!
Nowhere, was a mix of trial and error and somewhere on StackOverflow, which uses the same markup style, was mentioned that you can "stack" these sections.
Because three backticks are no longer limiting the code block, you can display them.
I think you can extend that infinitely. Eight, nine, ten or more "layers", whilen - 1
times the character which sets up your section is not affected and is displayed properly.Edit:
From clicking the "
Help
" button, I found out that you can also display three backticks using a 4 - space - indentation (in this case it's always four spaces to define the code block).Hello ``` World
written like:
____ Hello
____ ```
____ WorldBtw:
Just look at this ;-)
(Markup is fun :D)Hello World