1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-06 10:10:22 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Saq Imtiaz
092b745a8c Revert "Fix RSOE from filter operator errors (#9496)"
This reverts commit 86c4770a28.
2026-02-04 12:51:49 +01:00
2 changed files with 16 additions and 31 deletions

View File

@@ -88,8 +88,8 @@ function parseFilterOperation(operators,filterString,p) {
rexMatch = rex.exec(filterString.substring(p));
if(rexMatch) {
operator.regexp = new RegExp(rexMatch[1], rexMatch[2]);
// DEPRECATION WARNING
console.log("WARNING: Filter",operator.operator,"has a deprecated regexp operand",operator.regexp);
// DEPRECATION WARNING
console.log("WARNING: Filter",operator.operator,"has a deprecated regexp operand",operator.regexp);
nextBracketPos = p + rex.lastIndex - 1;
}
else {
@@ -232,12 +232,7 @@ exports.getFilterRunPrefixes = function() {
exports.filterTiddlers = function(filterString,widget,source) {
var fn = this.compileFilter(filterString);
try {
const fnResult = fn.call(this,source,widget);
return fnResult;
} catch(e) {
return [`${$tw.language.getString("Error/Filter")}: ${e}`];
}
return fn.call(this,source,widget);
};
/*
@@ -319,19 +314,19 @@ exports.compileFilter = function(filterString) {
// Invoke the appropriate filteroperator module
results = operatorFunction(accumulator,{
operator: operator.operator,
operand: operands.length > 0 ? operands[0] : undefined,
operands: operands,
multiValueOperands: multiValueOperands,
isMultiValueOperand: isMultiValueOperand,
prefix: operator.prefix,
suffix: operator.suffix,
suffixes: operator.suffixes,
regexp: operator.regexp
},{
wiki: self,
widget: widget
});
operator: operator.operator,
operand: operands.length > 0 ? operands[0] : undefined,
operands: operands,
multiValueOperands: multiValueOperands,
isMultiValueOperand: isMultiValueOperand,
prefix: operator.prefix,
suffix: operator.suffix,
suffixes: operator.suffixes,
regexp: operator.regexp
},{
wiki: self,
widget: widget
});
if($tw.utils.isArray(results)) {
accumulator = self.makeTiddlerIterator(results);
} else {

View File

@@ -1,10 +0,0 @@
title: $:/changenotes/5.4.0/#9496
description: Fix RSOE from decodebase64
release: 5.4.0
tags: $:/tags/ChangeNote
change-type: bugfix
change-category: filters
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9496
github-contributors: Leilei332
[[decodebase64 Operator]] now outputs error to the filter operator result.