1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00
TiddlyWiki5/plugins/tiddlywiki/markdown/config.tid

80 lines
2.5 KiB
Plaintext
Raw Normal View History

title: $:/plugins/tiddlywiki/markdown/config
! Plugin Configuration
|!Config |!Default |!Description |
|[[breaks|$:/config/markdown/breaks]]|`false`|markdown-it library config: Convert '\n' in paragraphs into `<br>` |
|[[linkify|$:/config/markdown/linkify]]|`false`|markdown-it library config: Autoconvert URL-like text to links |
|[[renderWikiText|$:/config/markdown/renderWikiText]]|`true`|After Markdown is parsed, should any text elements be handed off to the ~WikiText parser for further processing? |
|[[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]]|<code><$view tiddler="$:/plugins/tiddlywiki/markdown" subtiddler="$:/config/markdown/renderWikiTextPragma" mode="inline"/></code>|When handing off to the ~WikiText parser, what parser rules should it follow? |
|[[typographer|$:/config/markdown/typographer]]|`false`|markdown-it library config: Enable some language-neutral replacement + quotes beautification |
|[[quotes|$:/config/markdown/quotes]]|`“”‘’`|markdown-it library config: Double + single quotes replacement pairs, when `typographer` is enabled |
''IMPORTANT:'' You must reload your wiki for changes to take effect.
<h2 style="margin-top:1.5em">~WikiText Pragma</h2>
The value of [[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]] has been carefully tuned to properly integrate markdown with ~TiddlyWiki. Changing this setting may produce unexpected results, but the inclusion of the following parser rules should be fine:
; image
: embed images using ~TiddlyWiki's image syntax:
<p style="margin-left:1em">
```
[img[An explanatory tooltip|TiddlerTitle]]
[img width=23 class="tc-image" [https://tiddlywiki.com/fractalveg.jpg]]
```
</p>
; prettylink
: create links the ~TiddlyWiki way:
<p style="margin-left:1em">
```
[[TiddlerTitle]]
[[Displayed Link Title|Tiddler Title]]
[[TW5|https://tiddlywiki.com/]]
```
</p>
; prettyextlink
: create external links using the following syntax:
<p style="margin-left:1em">
```
[ext[Open file|index.html]]
[ext[Open file|../README.md]]
```
</p>
; wikilink
: auto-link ~CamelCase titles
; syslink
: auto-link system tiddlers
<h2 style="margin-top:1.5em">Typographical Replacements</h2>
When [[typographer|$:/config/markdown/typographer]] is enabled, markdown-it will provide these typographical replacements:
```
(c) (C) → ©
(tm) (TM) → ™
(r) (R) → ®
+- → ±
... → …
?.... → ?..
!.... → !..
????? → ???
!!!!! → !!!
,, → ,
-- → &ndash;
--- → &mdash;
```