Allow savers to receive options and variables
This pull request allows sending options to the savers. This may be useful if you want to configure the way the saver behaves when you send the save event, or even to allow communication between savers (or the same saver) if you save mechanism happens in two phases/steps.
The previous code was a bit confusing because it was saving optioins.variables into variables just for rebuilt the same object later {variables: { filename: variables.filename}}.
Hi @danielo515 the problem here is that we already use the "options" parameter that is passed into SaverHandler.prototype.saveWiki() in the call to this.wiki.renderTiddler(). If we now also pass the same "options" parameter through to saver.save() then we will have created a subtle and troublesome dependency between the options supported by these two unrelated methods.
At this point, I think the best alternative is to add a new option member to SaverHandler.prototype.saveWiki() called optionsSaveWiki and to pass that through to saver.save().
@danielo515, can you decouple the two, see which options are actually relevant and then recommit?
I did a similar PR. "2 way communication between contentScript and tiddlyfox.js #3010" will have to check that one too :)
I have to take some time to see if I can decouple them, because at this moment I'm not sure that I understand the problem.