mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-10 20:09:57 +00:00
Fix suffix does not work for base64 operators (#8574)
* Fix suffix does not work for base64 operators * Remove console.log
This commit is contained in:
parent
f0cb57fad8
commit
dcf63b75fa
@ -18,8 +18,8 @@ Export our filter functions
|
|||||||
|
|
||||||
exports.decodebase64 = function(source,operator,options) {
|
exports.decodebase64 = function(source,operator,options) {
|
||||||
var results = [];
|
var results = [];
|
||||||
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
|
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
|
||||||
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
|
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
results.push($tw.utils.base64Decode(title,binary,urlsafe));
|
results.push($tw.utils.base64Decode(title,binary,urlsafe));
|
||||||
});
|
});
|
||||||
@ -28,8 +28,8 @@ exports.decodebase64 = function(source,operator,options) {
|
|||||||
|
|
||||||
exports.encodebase64 = function(source,operator,options) {
|
exports.encodebase64 = function(source,operator,options) {
|
||||||
var results = [];
|
var results = [];
|
||||||
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
|
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
|
||||||
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
|
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
results.push($tw.utils.base64Encode(title,binary,urlsafe));
|
results.push($tw.utils.base64Encode(title,binary,urlsafe));
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user