First, I'd like to say that I've read some recommended questions that may seem to answer my question, but they're all about escape single backtick in markdown. I've tried but none of them seem to work.
Here's what I've tried.
1.Double backtick - single space - three backticks.
and it seems to be good in my markdown editor except missing the breakline. But bad luck, it seems terrible on hexo blog.
Then I test in Github for luck. And, difference shows.
2.Use backslash.
Unfortunatly, it shows dirrectly instead of escape the backtick.
Now, my question is, it works well here in sof, but not in my blog. What else I should try except using html tag, or is it the only way I should go? Is it the issue with my usage or my blog theme? Thanks in advance.
The bottom line is that ~~~ and ```` allow you to escape markdown code blocks for up to 2 nested levels - one for each of those escape sequences!
To include a non-code formatted backtick it can be added by escaping it with a \ .
As mentioned in the other answers to the question, you can simply escape backticks with a backslash `\` for inline formatting. Extra spacing also required if you want a backtick at the start of your quote.
In addition to nesting a fenced block inside an indented block (as demonstrated in another answer), you can also nest one fenced block inside another fenced block by using a different number of backticks (as you have tried). However, you must keep each set of deliminators on a separate line. And most implementations require three or more backticks (your use of 2 is another failure point). For example, notice that in the following example the outer block uses four backticks whereas the inner block uses three backticks:
````
```
UIBarButtonItem *search = [[UIBarButtonItem alloc]
```
````
In many implementations that will render as:
```
UIBarButtonItem *search = [[UIBarButtonItem alloc]
```
You may find this is not supported properly with some implementations however.
As an alternative, if the implementation you are using also supports tildes (~
) as fenced code block deliminators, you can use those instead:
~~~
```
UIBarButtonItem *search = [[UIBarButtonItem alloc]
```
~~~
Again, never use less that three deliminator characters in a group and always include each group on a separate line by itself.
There are two ways to represent code blocks in most Markdown implementations:
You can combine these techniques, causing the triple backticks from your fenced block to be treated part of the indented code block, e.g.
```
UIBarButtonItem *search = [[UIBarButtonItem alloc]
```
This snippet renders like this on Stack Overflow:
```
UIBarButtonItem *search = [[UIBarButtonItem alloc]
```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With