mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
tag list in "status bar", closes #28
This commit is contained in:
@@ -118,4 +118,18 @@ async function stopWatch(what, func) {
|
||||
function executeScript(script) {
|
||||
// last \r\n is necessary if script contains line comment on its last line
|
||||
eval("(async function() {" + script + "\r\n})()");
|
||||
}
|
||||
|
||||
function formatValueWithWhitespace(val) {
|
||||
return /\s/.test(val) ? '"' + val + '"' : val;
|
||||
}
|
||||
|
||||
function formatAttribute(attr) {
|
||||
let str = "@" + formatValueWithWhitespace(attr.name);
|
||||
|
||||
if (attr.value !== "") {
|
||||
str += "=" + formatValueWithWhitespace(attr.value);
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
Reference in New Issue
Block a user