mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-28 04:19:56 +00:00
80256b4dab
* Add string '.htm' to 'Saving with TiddlyIE' * Change external links to match locale with wiki language * Add instructions for use to 'Saving on Android' * Change string in 'task' * Change instructions for use in 'Saving on iPad/iPhone' * Add newline to 'TiddlyDesktop Releases' * Remove caption from 'Serving TW5 from Android' * Change link to external in tiddlers which tagged 'Editions' * Remove string 'index.html' from 'Some of the things you can do with TiddlyWiki' * Change link 'TiddlyWiki Groups' to 'Forums' in tiddlers which tagged 'Community' * Remove CamelCase link 'TiddlyWiki' from tiddlers tagged 'Community' * Change string 'done' to 'Upgrade' in 'UpgradeMechanism' * Change buttons to images in 'How to export tiddlers' * Add images about buttons to tiddlers * Add quotation mark to text 'edit' in 'Signing the Contributor License Agreement' * Rename 'UsingSVG' to 'Using SVG' * Change link 'TypedBlockWikiText' to 'Typed Blocks in WikiText' in 'Using SVG' * Add tiddler 'Using Stamp' * Add 'rel="noopener noreferrer"' to external links * Add description about 'rel="noreferrer"' to 'HTML in WikiText' * Add link of prerelease version about translators edition, and how to translate on Node.js, in 'Translate TiddlyWiki into your language' * Change string 'dropdown' to 'tab' in 'Installing a plugin from the plugin library' * Add download button to 'Empty Edition'
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 ({{$:/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|http://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.
|
|
|