mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +00:00
Init less parsers (#4954)
* add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * Don't override browser selection colours by default Reverts some of #4590 * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * it shouldn't be there * fremove this file from my PRs * list-widget, init new Parser() only if needed. * fix braces Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
This commit is contained in:
parent
e9a635dc81
commit
42b965c9f0
|
@ -87,8 +87,14 @@ ListWidget.prototype.getTiddlerList = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
ListWidget.prototype.getEmptyMessage = function() {
|
ListWidget.prototype.getEmptyMessage = function() {
|
||||||
var emptyMessage = this.getAttribute("emptyMessage",""),
|
var parser,
|
||||||
parser = this.wiki.parseText("text/vnd.tiddlywiki",emptyMessage,{parseAsInline: true});
|
emptyMessage = this.getAttribute("emptyMessage","");
|
||||||
|
// this.wiki.parseText() calls
|
||||||
|
// new Parser(..), which should only be done, if needed, because it's heavy!
|
||||||
|
if (emptyMessage === "") {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
parser = this.wiki.parseText("text/vnd.tiddlywiki",emptyMessage,{parseAsInline: true});
|
||||||
if(parser) {
|
if(parser) {
|
||||||
return parser.tree;
|
return parser.tree;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user