mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/develop' into feature/investigate_tests
This commit is contained in:
commit
e89faf6786
@ -1,4 +1,4 @@
|
||||
const utils = require("./utils.js");
|
||||
import utils from "./utils.js";
|
||||
|
||||
function lex(str) {
|
||||
str = str.trim();
|
||||
@ -121,7 +121,7 @@ function parse(tokens, str, allowEmptyRelations = false) {
|
||||
const attrs = [];
|
||||
|
||||
function context(i) {
|
||||
let {startIndex, endIndex} = tokens[i];
|
||||
let { startIndex, endIndex } = tokens[i];
|
||||
startIndex = Math.max(0, startIndex - 20);
|
||||
endIndex = Math.min(str.length, endIndex + 20);
|
||||
|
||||
@ -129,7 +129,7 @@ function parse(tokens, str, allowEmptyRelations = false) {
|
||||
}
|
||||
|
||||
for (let i = 0; i < tokens.length; i++) {
|
||||
const {text, startIndex} = tokens[i];
|
||||
const { text, startIndex } = tokens[i];
|
||||
|
||||
function isInheritable() {
|
||||
if (tokens.length > i + 3
|
||||
@ -222,7 +222,7 @@ function lexAndParse(str, allowEmptyRelations = false) {
|
||||
return parse(tokens, str, allowEmptyRelations);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
lex,
|
||||
parse,
|
||||
lexAndParse
|
||||
|
@ -371,10 +371,10 @@ function escapeRegExp(str) {
|
||||
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
||||
}
|
||||
|
||||
function areObjectsEqual () {
|
||||
function areObjectsEqual() {
|
||||
let i, l, leftChain, rightChain;
|
||||
|
||||
function compare2Objects (x, y) {
|
||||
function compare2Objects(x, y) {
|
||||
let p;
|
||||
|
||||
// remember that NaN === NaN returns false
|
||||
@ -449,7 +449,7 @@ function areObjectsEqual () {
|
||||
leftChain.push(x);
|
||||
rightChain.push(y);
|
||||
|
||||
if (!compare2Objects (x[p], y[p])) {
|
||||
if (!compare2Objects(x[p], y[p])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -505,7 +505,7 @@ function createImageSrcUrl(note) {
|
||||
return `api/images/${note.noteId}/${encodeURIComponent(note.title)}?timestamp=${Date.now()}`;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
reloadFrontendApp,
|
||||
parseDate,
|
||||
formatDateISO,
|
||||
|
Loading…
x
Reference in New Issue
Block a user