Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit e89faf6

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/investigate_tests
2 parents eb39da1 + 66108c1 commit e89faf6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/public/app/services/attribute_parser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const utils = require("./utils.js");
1+
import utils from "./utils.js";
22

33
function lex(str) {
44
str = str.trim();
@@ -121,15 +121,15 @@ function parse(tokens, str, allowEmptyRelations = false) {
121121
const attrs = [];
122122

123123
function context(i) {
124-
let {startIndex, endIndex} = tokens[i];
124+
let { startIndex, endIndex } = tokens[i];
125125
startIndex = Math.max(0, startIndex - 20);
126126
endIndex = Math.min(str.length, endIndex + 20);
127127

128128
return `"${startIndex !== 0 ? "..." : ""}${str.substr(startIndex, endIndex - startIndex)}${endIndex !== str.length ? "..." : ""}"`;
129129
}
130130

131131
for (let i = 0; i < tokens.length; i++) {
132-
const {text, startIndex} = tokens[i];
132+
const { text, startIndex } = tokens[i];
133133

134134
function isInheritable() {
135135
if (tokens.length > i + 3
@@ -222,7 +222,7 @@ function lexAndParse(str, allowEmptyRelations = false) {
222222
return parse(tokens, str, allowEmptyRelations);
223223
}
224224

225-
module.exports = {
225+
export default {
226226
lex,
227227
parse,
228228
lexAndParse

src/public/app/services/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ function escapeRegExp(str) {
371371
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
372372
}
373373

374-
function areObjectsEqual () {
374+
function areObjectsEqual() {
375375
let i, l, leftChain, rightChain;
376376

377-
function compare2Objects (x, y) {
377+
function compare2Objects(x, y) {
378378
let p;
379379

380380
// remember that NaN === NaN returns false
@@ -449,7 +449,7 @@ function areObjectsEqual () {
449449
leftChain.push(x);
450450
rightChain.push(y);
451451

452-
if (!compare2Objects (x[p], y[p])) {
452+
if (!compare2Objects(x[p], y[p])) {
453453
return false;
454454
}
455455

@@ -505,7 +505,7 @@ function createImageSrcUrl(note) {
505505
return `api/images/${note.noteId}/${encodeURIComponent(note.title)}?timestamp=${Date.now()}`;
506506
}
507507

508-
module.exports = {
508+
export default {
509509
reloadFrontendApp,
510510
parseDate,
511511
formatDateISO,

0 commit comments

Comments
 (0)