Modify occurrences of subskin syntax in skins to a skin comment to prevent surprising effects

This commit is contained in:
Tobi Schäfer 2008-05-09 20:02:31 +00:00
parent a3ec837524
commit 3fd3a65fd9

View file

@ -207,15 +207,16 @@ Skin.prototype.getSource = function() {
}
Skin.prototype.setSource = function(source) {
res.push();
if (source != null) {
res.writeln("<% #" + this.name + " %>");
res.writeln(source.trim());
}
var skin = this.getMainSkin();
if (!skin) {
return;
}
res.push();
if (source != null) {
res.writeln("<% #" + this.name + " %>");
res.writeln(source.trim().replace(/(<%\s*)#/g, "$1// #"));
}
var subskins = skin.getSubskinNames();
for (var i in subskins) {
if (subskins[i] !== this.name) {