From 4e07b3335b570f4039427e11df729fc4a899a671 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 13 May 2014 10:27:03 +0100 Subject: [PATCH] Extend .tid files to allow single line text fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To make it easier to create tiddlers that don’t include a terminating newline in their text --- boot/boot.js | 2 -- .../tw5.com/tiddlers/deserializers/TiddlerFiles.tid | 12 ++++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 403622b3b..4efc7f560 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -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]; } diff --git a/editions/tw5.com/tiddlers/deserializers/TiddlerFiles.tid b/editions/tw5.com/tiddlers/deserializers/TiddlerFiles.tid index 007a33248..3c78d9c2a 100644 --- a/editions/tw5.com/tiddlers/deserializers/TiddlerFiles.tid +++ b/editions/tw5.com/tiddlers/deserializers/TiddlerFiles.tid @@ -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 `
` .tiddler files @@ -30,7 +38,7 @@ Modern `*.tiddler` files look like this: ```
Note that there is an embedded 
 tag, and line feeds are not escaped.
-	
+
 And, weirdly, there is no HTML encoding of the body.
```