I have single quote inside my inline codes. Something like, "echo [single back quote] cat file.txt[single back quote]", where the whole thing within double quotes need to be shown as code. How do I display the single quotes? Which escape character need to be used? I tried \ without any avail.
You can write any character using the HTML character entity, in this case
I'm using first the written symbol ` Now I'm using the character entity ` All of this was writen using <pre> tags
You can say
echo `cat file.txt` by typing
``echo `cat file.txt` ``
<code>echo \`cat file.txt`</code>
The first example requires a space after the
to disambiguate the triple backquote that would otherwise occur.
I don't fully understand why the second example requires a backslash before the first backtick
but not the second one.
(Admission, just wanted an excuse to do unspeakable things to markdown)
' OH HARK, A SINGLE QUOTE?
" DOUBLE QUOTES TOO!
` OR EVEN A BACKTICK!
You cannot however...
wrap pre tags in pre tags
But everything else is fair game.
Just to make sure This works With multiple lines `````````
pre tags seem un-wrappable, alas, so you will have to check the edit history, or pretend to edit this to see my markdown.