mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-17 03:20:02 +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() {
|
||||
var emptyMessage = this.getAttribute("emptyMessage",""),
|
||||
parser = this.wiki.parseText("text/vnd.tiddlywiki",emptyMessage,{parseAsInline: true});
|
||||
var parser,
|
||||
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) {
|
||||
return parser.tree;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user