1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Extend .tid files to allow single line text fields

To make it easier to create tiddlers that don’t include a terminating
newline in their text
This commit is contained in:
Jermolene 2014-05-13 10:27:03 +01:00
parent b77d5f9725
commit 4e07b3335b
2 changed files with 10 additions and 4 deletions

View File

@ -1166,8 +1166,6 @@ $tw.modules.define("$:/boot/tiddlerdeserializer/tid","tiddlerdeserializer",{
}
if(split.length >= 2) {
fields.text = split.slice(1).join("\n\n");
} else {
fields.text = "";
}
return [fields];
}

View File

@ -1,5 +1,5 @@
created: 201308251500
modified: 201308251621
modified: 201405131621
tags: deserializers dev
title: TiddlerFiles
@ -21,6 +21,14 @@ modifier: Jeremy
This is the text of my tiddler.
```
Note that many text editors require that files include a terminating newline. If you want to avoid including the terminating newline in the text of the tiddler you can use this alternative syntax:
```
title: MyTiddler
modifier: Jeremy
text: This is the text of my tiddler.
```
//The ContentType `application/x-tiddler` is used internally for these files//
!! TiddlyWiki `<DIV>` .tiddler files