mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-06 22:04:19 +00:00
parent
2475e1b501
commit
9caba544eb
@ -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
|
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||||
*/
|
*/
|
||||||
CodeBlockWidget.prototype.refresh = function(changedTiddlers) {
|
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;
|
exports.codeblock = CodeBlockWidget;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user