Skip to content

Commit

Permalink
Fix console command formatting filter
Browse files Browse the repository at this point in the history
It would previously refuse to format anything starting with >>, but
now it specifically filters ">> " and ">>> " to match the server, so
other lines starting with ">>" such as ">>>>>memeing" is formatted.

(This is, if you were wondering, in preparation for an implementation
of greentext)
  • Loading branch information
Zarel committed Apr 2, 2016
1 parent 19d3e7a commit 28820d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/battledata.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ var Tools = {
parseMessage: function (str) {
str = Tools.escapeHTML(str);
// Don't format console commands (>>).
if (str.substr(0, 8) === '>>') return str;
if (str.substr(0, 9) === '>> ' || str.substr(0, 13) === '>>> ') return str;
// Don't format console results (<<).
if (str.substr(0, 9) === '&lt;&lt; ') return str;

Expand Down

0 comments on commit 28820d2

Please sign in to comment.