Files
Trilium/src/services/search/parsing_context.js

21 lines
536 B
JavaScript
Raw Normal View History

2020-05-21 11:46:01 +02:00
"use strict";
class ParsingContext {
constructor(params = {}) {
this.includeNoteContent = !!params.includeNoteContent;
this.fuzzyAttributeSearch = !!params.fuzzyAttributeSearch;
2020-05-21 11:46:01 +02:00
this.highlightedTokens = [];
this.error = null;
}
addError(error) {
// we record only the first error, subsequent ones are usually consequence of the first
if (!this.error) {
this.error = error;
2020-05-25 00:25:47 +02:00
console.log(this.error);
2020-05-21 11:46:01 +02:00
}
}
}
module.exports = ParsingContext;