From 300b6cc48534e10da782ecf11006cdc2c95727c5 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 30 Dec 2012 13:55:19 +0000 Subject: [PATCH] Change widget syntax to `$` instead of underscore eg `<$list>` --- core/modules/parsers/wikiparser/rules/html.js | 8 ++++---- core/templates/PageTemplate.tid | 8 ++++---- core/templates/StaticContent.tid | 6 +++--- core/templates/TagTemplate.tid | 2 +- core/templates/ViewTemplate.tid | 14 +++++++------- core/templates/css-tiddler.tid | 2 +- core/templates/html-div-tiddler.tid | 4 ++-- core/templates/html-tiddler.tid | 2 +- core/templates/javascript-tiddler.tid | 2 +- core/templates/module-tiddler.tid | 2 +- core/templates/plain-text-tiddler.tid | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/html.js b/core/modules/parsers/wikiparser/rules/html.js index f103f5615..b92836596 100644 --- a/core/modules/parsers/wikiparser/rules/html.js +++ b/core/modules/parsers/wikiparser/rules/html.js @@ -10,9 +10,9 @@ Wiki rule for HTML elements and widgets. For example: This is an HTML5 aside element -<_slider target="MyTiddler"> +<$slider target="MyTiddler"> This is a widget invocation - + }}} @@ -31,7 +31,7 @@ var voidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta exports.init = function(parser) { this.parser = parser; // Regexp to match - this.matchRegExp = /<(_)?([A-Za-z]+)(\s*[^>]*?)(\/)?>/mg; + this.matchRegExp = /<(\$)?([A-Za-z]+)(\s*[^>]*?)(\/)?>/mg; }; /* @@ -78,7 +78,7 @@ exports.parse = function() { isBlock = false; } if(!isSelfClosing && (isWidget || voidElements.indexOf(tagName) === -1)) { - var reEndString = "()", + var reEndString = "()", reEnd = new RegExp(reEndString,"mg"), content; if(isBlock) { diff --git a/core/templates/PageTemplate.tid b/core/templates/PageTemplate.tid index fe19470b4..40807acb8 100644 --- a/core/templates/PageTemplate.tid +++ b/core/templates/PageTemplate.tid @@ -1,7 +1,7 @@ title: $:/templates/PageTemplate -<_navigator story="$:/StoryList" history="$:/HistoryList"> +<$navigator story="$:/StoryList" history="$:/HistoryList"> - + diff --git a/core/templates/StaticContent.tid b/core/templates/StaticContent.tid index 4dbb3b0ed..a02a74e58 100644 --- a/core/templates/StaticContent.tid +++ b/core/templates/StaticContent.tid @@ -2,6 +2,6 @@ title: $:/templates/StaticContent type: text/vnd.tiddlywiki -<_list filter="[!is[shadow]sort[title]]" > -<_view field="title" format="text"> - +<$list filter="[!is[shadow]sort[title]]" > +<$view field="title" format="text"> + diff --git a/core/templates/TagTemplate.tid b/core/templates/TagTemplate.tid index 3e64270cc..c9137640b 100644 --- a/core/templates/TagTemplate.tid +++ b/core/templates/TagTemplate.tid @@ -1,5 +1,5 @@ title: $:/templates/TagTemplate @@.label -<_view field="title" format="text" /> +<$view field="title" format="text" /> @@ diff --git a/core/templates/ViewTemplate.tid b/core/templates/ViewTemplate.tid index 7bd2e6477..7e3e4c43c 100644 --- a/core/templates/ViewTemplate.tid +++ b/core/templates/ViewTemplate.tid @@ -2,18 +2,18 @@ title: $:/templates/ViewTemplate modifier: JeremyRuston - <_view field="title"/> - <_button message="tw-close">close + <$view field="title"/> + <$button message="tw-close">close
- <_view field="modifier" format="link"/> - <_view field="modified" format="date"/> + <$view field="modifier" format="link"/> + <$view field="modified" format="date"/>
-@@.tw-tags-wrapper <_list filter="[is[current]tags[]]" template="$:/templates/TagTemplate" />@@ +@@.tw-tags-wrapper <$list filter="[is[current]tags[]]" template="$:/templates/TagTemplate" />@@
- <_view field="text" format="wikified"> - + <$view field="text" format="wikified"> +
diff --git a/core/templates/css-tiddler.tid b/core/templates/css-tiddler.tid index eae9f04df..f12a0d781 100644 --- a/core/templates/css-tiddler.tid +++ b/core/templates/css-tiddler.tid @@ -4,4 +4,4 @@ title: $:/core/templates/css-tiddler This template is used for saving CSS tiddlers as a style tag with data attributes representing the tiddler fields. --->`` type="text/css">`<_view field="text" format="text" />`` \ No newline at end of file +-->`` type="text/css">`<$view field="text" format="text" />`` \ No newline at end of file diff --git a/core/templates/html-div-tiddler.tid b/core/templates/html-div-tiddler.tid index 00f65c460..6e3001cf5 100644 --- a/core/templates/html-div-tiddler.tid +++ b/core/templates/html-div-tiddler.tid @@ -4,6 +4,6 @@ title: $:/core/templates/html-div-tiddler This template is used for saving tiddlers as an HTML DIV tag with attributes representing the tiddler fields. --->``> -
`<_view field="text" format="htmlencoded" />`
+-->``> +
`<$view field="text" format="htmlencoded" />`
` diff --git a/core/templates/html-tiddler.tid b/core/templates/html-tiddler.tid index 581af29d7..d6943a327 100644 --- a/core/templates/html-tiddler.tid +++ b/core/templates/html-tiddler.tid @@ -4,4 +4,4 @@ title: $:/core/templates/html-tiddler This template is used for saving tiddlers as raw HTML ---><_view field="text" format="htmlwikified" /> \ No newline at end of file +--><$view field="text" format="htmlwikified" /> \ No newline at end of file diff --git a/core/templates/javascript-tiddler.tid b/core/templates/javascript-tiddler.tid index efe645baf..94db60651 100644 --- a/core/templates/javascript-tiddler.tid +++ b/core/templates/javascript-tiddler.tid @@ -4,4 +4,4 @@ title: $:/core/templates/javascript-tiddler This template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields. --->`` type="text/javascript">`<_view field="text" format="text" />`` \ No newline at end of file +-->`` type="text/javascript">`<$view field="text" format="text" />`` \ No newline at end of file diff --git a/core/templates/module-tiddler.tid b/core/templates/module-tiddler.tid index d44675ff8..8a0e6c444 100644 --- a/core/templates/module-tiddler.tid +++ b/core/templates/module-tiddler.tid @@ -4,5 +4,5 @@ title: $:/core/templates/module-tiddler This template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields. The body of the tiddler is wrapped in a call to the `$tw.modules.define` function in order to define the body of the tiddler as a module --->`` type="text/javascript" data-module="yes">$tw.modules.define("`<_view field="title" format="jsencoded" />`","`<_view field="module-type" format="jsencoded" />`",function(module,exports,require) {`<_view field="text" format="text" />`}); +-->`` type="text/javascript" data-module="yes">$tw.modules.define("`<$view field="title" format="jsencoded" />`","`<$view field="module-type" format="jsencoded" />`",function(module,exports,require) {`<$view field="text" format="text" />`}); ` \ No newline at end of file diff --git a/core/templates/plain-text-tiddler.tid b/core/templates/plain-text-tiddler.tid index f26363ad7..4858930ac 100644 --- a/core/templates/plain-text-tiddler.tid +++ b/core/templates/plain-text-tiddler.tid @@ -1,3 +1,3 @@ title: $:/core/templates/plain-text-tiddler -<_view field="text" format="text" /> \ No newline at end of file +<$view field="text" format="text" /> \ No newline at end of file