diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 87a4af92c..08d5deb19 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -467,6 +467,8 @@ Syncer.prototype.dispatchTask = function(task,callback) { }; // Invoke the callback callback(null); + },{ + tiddlerInfo: self.tiddlerInfo[task.title] }); } else { this.logger.log(" Not Dispatching 'save' task:",task.title,"tiddler does not exist"); @@ -493,6 +495,7 @@ Syncer.prototype.dispatchTask = function(task,callback) { if(err) { return callback(err); } + delete self.tiddlerInfo[task.title]; // Invoke the callback callback(null); },{ diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index f5b9fc048..4708ecb39 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -39,7 +39,7 @@ exports.httpRequest = function(options) { // Set up the state change handler request.onreadystatechange = function() { if(this.readyState === 4) { - if(this.status === 200 || this.status === 204) { + if(this.status === 200 || this.status === 201 || this.status === 204) { // Success! options.callback(null,this.responseText,this); return; diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index bc20d44c6..34a912851 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -65,7 +65,11 @@ TranscludeWidget.prototype.execute = function() { // Check for recursion if(parser) { if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) { - parseTreeNodes = [{type: "text", text: "Recursive transclusion error in transclude widget"}]; + parseTreeNodes = [{type: "element", tag: "span", attributes: { + "class": {type: "string", value: "tc-error"} + }, children: [ + {type: "text", text: "Recursive transclusion error in transclude widget"} + ]}]; } } // Construct the child widgets diff --git a/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid b/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid index 5396f2081..6fdc6af3c 100644 --- a/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid +++ b/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid @@ -79,13 +79,14 @@ This method is optional. If an adaptor doesn't implement it then synchronisation |!Parameter |!Description | |callback |Callback function invoked with parameter `err,tiddlers`, where `tiddlers` is an array of tiddler field objects | -!! `saveTiddler(tiddler,callback)` +!! `saveTiddler(tiddler,callback,tiddlerInfo)` Saves a tiddler to the server. |!Parameter |!Description | |tiddler |Tiddler to be saved | |callback |Callback function invoked with parameter `err,adaptorInfo,revision` | +|tiddlerInfo |The tiddlerInfo maintained by the syncer for this tiddler | !! `loadTiddler(title,callback)` diff --git a/editions/katexdemo/tiddlers/HelloThere.tid b/editions/katexdemo/tiddlers/HelloThere.tid index 9b807f77a..719121c1e 100644 --- a/editions/katexdemo/tiddlers/HelloThere.tid +++ b/editions/katexdemo/tiddlers/HelloThere.tid @@ -63,3 +63,14 @@ For more flexibility the KaTeX widget can also be used via the full widget synta ``` <$latex text="\displaystyle f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi"> + +! Error Handling + +An warning message is displayed if KaTeX detects a problem with the ~LaTeX syntax. For example: + +``` +$$\displaystyle f(x) = \int_{-\infty}^\infinity\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi$$ +``` + +$$\displaystyle f(x) = \int_{-\infty}^\infinity\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi$$ + diff --git a/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid b/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid index 751ed1aa9..69dd6bb55 100644 --- a/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid @@ -5,7 +5,7 @@ title: Some of the things you can do with TiddlyWiki type: text/vnd.tiddlywiki * Take notes, and use tags and hyperlinking to form relationships between your notes -* Use tabs, tables, tag-based lists, and tables of contents to get organzed +* Use tabs, tables, tag-based lists, and tables of contents to get organised * Bookmark your favorite websites (see an example at http://giffmex.org/experiments/tidmarks.html) * Keep track of tasks and appointments, and organise them by multiple tags (see our TaskManagementExample) * Inventory just about anything: your recipes, personal library, contacts, music collection, and more diff --git a/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid b/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid index b1dec1792..30afe03ed 100644 --- a/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid @@ -1,5 +1,5 @@ created: 20140908114400000 -modified: 20140916141919329 +modified: 20140923141919329 tags: About title: History of TiddlyWiki type: text/vnd.tiddlywiki @@ -56,3 +56,10 @@ Our approach was to focus on showing rather than telling. We worked with the Tid By the end of 2011 I was increasingly feeling that I would be better placed to realise the potential of TiddlyWiki outside of the corporate confines BT. Accordingly, I left and started work as an independent developer, primarily working on a brand new reboot of TiddlyWiki in the shape of TiddlyWiki5. +! Development of TiddlyWiki5 + +I worked on new release of TiddlyWiki from November 2011. As a programmer, working on "version 2.0" of something that I had already written is a very attractive proposition. It means that the requirements were fully understood, allowing me to focus on evolving the architecture needed to support the desired functionality. + +! The Future + +Now that TiddlyWiki5 has finally left "beta" status behind, my hope is that it will have a long life. Because it only uses standard features of HTML5 and Node.js, there is no reason why it cannot be fully operational for many years to come. My goal is for it last for at least 25 years. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid b/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid new file mode 100644 index 000000000..82cbda969 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid @@ -0,0 +1,12 @@ +created: 20140924115616653 +modified: 20140924115627781 +tags: Filters +title: FilterOperator: fields +type: text/vnd.tiddlywiki + +The ''fields'' filter operator returns the names of all the fields used in the currently selected tiddlers. + +|!Filter String |!Description | +|`[[HelloThere]fields[]]` |Returns the fields present in the tiddler `HelloThere` | +|`[tag[myTag]fields[]]` |Returns the aggregate of all the fields present on tiddlers that have the tag `myTag` | + diff --git a/editions/tw5.com/tiddlers/plugins/Plugins.tid b/editions/tw5.com/tiddlers/plugins/Plugins.tid index 9dcdd35ff..00b6ae653 100644 --- a/editions/tw5.com/tiddlers/plugins/Plugins.tid +++ b/editions/tw5.com/tiddlers/plugins/Plugins.tid @@ -8,7 +8,7 @@ type: text/vnd.tiddlywiki The following plugins are distributed on tiddlywiki.com as part of the main TiddlyWiki distribution. -> +<> ! What is a plugin? diff --git a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid index 4e4e73169..67b43026f 100644 --- a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid @@ -1,9 +1,9 @@ +caption: Lists created: 20131205160257619 -modified: 20131206154613715 +modified: 20140924112303029 tags: WikiText title: Lists in WikiText type: text/vnd.tiddlywiki -caption: Lists ! Unordered Lists @@ -52,3 +52,31 @@ Note that [[Block Quotes in WikiText]] can be mixed with lists. For example: **> Another quote * List Three ">> + +! Paragraphs in Lists + +Entries in the list are delimited with a linebreak, making it impossible to include linebreaks within a list entry. There are a couple of workarounds. + +First, you can transclude paragraph content from another tiddler. For example: + +``` +* First entry +* <$transclude tiddler="MyTiddler" mode="block"/> +* Third entry +``` + +Secondly, you can use an HTML "div" element to contain the multiline content. For example: + +``` +# Step 1 +# Step 2 +# Step 3
+ +Here is the first of several paragraphs. Note that the double linebreak preceding this paragraph is significant. + +And here is the second of several paragraphs. +
+# Step 4 +# Step 5 +# Step 6 +``` diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index 2587d70b0..32c37ad20 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -170,3 +170,5 @@ Eucaly J, @Eucaly, 2014/09/14 Mal Gamble, @malgam, 2014/09/19 Ton Gerner, @gernert, 2014/09/19 + +Julie Bertrand, @Evolena, 2014/09/22 diff --git a/plugins/tiddlywiki/katex/wrapper.js b/plugins/tiddlywiki/katex/wrapper.js index 36aa9d911..517ff5950 100644 --- a/plugins/tiddlywiki/katex/wrapper.js +++ b/plugins/tiddlywiki/katex/wrapper.js @@ -36,7 +36,12 @@ KaTeXWidget.prototype.render = function(parent,nextSibling) { var text = this.getAttribute("text",this.parseTreeNode.text || ""); // Render it into a span var span = this.document.createElement("span"); - katex.render(text,span); + try { + katex.render(text,span); + } catch(ex) { + span.className = "tc-error"; + span.textContent = ex; + } // Insert it into the DOM parent.insertBefore(span,nextSibling); this.domNodes.push(span); diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index cab965d92..0ee6e2330 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1447,3 +1447,12 @@ body.tc-dirty span.tc-dirty-indicator, body.tc-dirty span.tc-dirty-indicator svg cursor: pointer; display: inline-block; } + +/* +** Errors +*/ + +.tc-error { + background: #f00; + color: #fff; +}