1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-24 22:33:16 +00:00

Fix refreshing of codeblock widget

Fixes #6171
This commit is contained in:
jeremy@jermolene.com 2021-11-05 08:28:56 +00:00
parent 2475e1b501
commit 9caba544eb

View File

@ -52,7 +52,13 @@ CodeBlockWidget.prototype.execute = function() {
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
CodeBlockWidget.prototype.refresh = function(changedTiddlers) {
return false;
var changedAttributes = this.computeAttributes();
if(changedAttributes.code || changedAttributes.language) {
this.refreshSelf();
return true;
} else {
return false;
}
};
exports.codeblock = CodeBlockWidget;