How to escape the back-tick (`) character in tiddlywiki?

3.4k Views Asked by At

I would like to use the back-tick in regular text (not in a code snippet) in TW5. Is this possible?

2

There are 2 best solutions below

0
On BEST ANSWER

In TiddlyWiki5 you can disable certain parsing rules using the \rules pragma

A pragma is a special component of WikiText that provides control over the way the remaining text is parsed.

http://tiddlywiki.com/#Pragma

So if you add

\rules except codeinline

at the very(!) beginning of your tiddler text, any following backtick symbol in the text is not interpreted as special character.

This comes however at the cost that you cannot use this symbol as wikitext-directive anymore to achieve inline-code for programming snippets. Instead you would need to add the html code tag manually.

1
On

It is also possible to use the hex code (`) or the HTML code (&#96) for back-tick

I wanted to display a back-tick in a code block, so used:

<code>&#x60;</code>

Using the HTML code looks like:

<code>&#96;</code>

This has the advantage that you're not disabling any parsing rules.