mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-29 11:30:28 +00:00
31c4fd586b
* Corecting URL of LuckySushi shop * Android-Instructions remained for Andtidwiki * Updating description and feature set of Timimi Updating URL of Widdly Resolving minor camelcase issues in TiddlySpot * Detailed instructions about termux and adding it to save methods * Correcting the words "open source" and "Unix" * Changing link protocols of verified domains to https
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
caption: Code Blocks
|
|
created: 20131205160047557
|
|
modified: 20160606140326254
|
|
tags: WikiText
|
|
title: Code Blocks in WikiText
|
|
type: text/vnd.tiddlywiki
|
|
|
|
You can use triple backticks <code>```</code> to mark code blocks (<<.icon $:/core/images/mono-block>>):
|
|
|
|
<pre>
|
|
```
|
|
This will be monospaced
|
|
```
|
|
</pre>
|
|
|
|
Renders as:
|
|
|
|
```
|
|
This will be monospaced
|
|
```
|
|
|
|
To be interpreted correctly, the three backticks need to be at the start of the line and immediately followed by a line-break.
|
|
|
|
Be aware that any preceding paragraph content should be properly terminated with a double line break, too. So, this example is wrong:
|
|
|
|
<pre>
|
|
This is an ordinary paragraph
|
|
```
|
|
This will be monospaced
|
|
```
|
|
</pre>
|
|
|
|
The correct version is:
|
|
|
|
<pre>
|
|
This is an ordinary paragraph
|
|
|
|
```
|
|
This will be monospaced
|
|
```
|
|
</pre>
|
|
|
|
Note that some keyboard layouts treat the backtick as a [[dead key|https://en.wikipedia.org/wiki/Dead_key]], making it hard to type. The trick is to type three backticks followed by a space. Alternatively, type all six backticks in one go, then a space, and then move the cursor back three characters to type or paste the content.
|
|
|