Skip to content

Commit

Permalink
Merge pull request tweecode#2 from tmedwards/master
Browse files Browse the repository at this point in the history
Fixes for <<print>> and <<choice>>
  • Loading branch information
webbedspace committed Oct 22, 2013
2 parents b65490d + 244480c commit e1b4b41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion targets/Responsive/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@
};
macros.choice = {
handler: function (a, b, c) {
Wikifier.createInternalLink(a, c[0])
var el = Wikifier.createInternalLink(a, c[0]);
el.innerHTML = c[0];
}
};
}());
Expand Down
4 changes: 2 additions & 2 deletions targets/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ macros['print'] = {
handler: function (place, macroName, params, parser) {
try {
var output = eval(parser.fullArgs());
if (output != null || !isNaN(output)) {
if (output != null && (typeof output !== "number" || !isNaN(output))) {
new Wikifier(place, output.toString());
}
} catch (e) {
Expand Down Expand Up @@ -1423,4 +1423,4 @@ function main() {
addStyle(styles[i].text);
}
state.init();
};
};
3 changes: 2 additions & 1 deletion targets/sugarcane/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@
};
macros.choice = {
handler: function (a, b, c) {
Wikifier.createInternalLink(a, c[0])
var el = Wikifier.createInternalLink(a, c[0]);
el.innerHTML = c[0];
}
};
}());
Expand Down

0 comments on commit e1b4b41

Please sign in to comment.