Skip to content

Commit

Permalink
FIX: don't run the old deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitjalan committed Oct 31, 2016
1 parent f47a43b commit 66f1e4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/javascripts/bbcode_color_dialect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
(function() {
// Don't bother with this code if the new dialect system is present
if (Discourse.dialect_deprecated) { return; }

function replaceFontColor (text) {
while (text !== (text = text.replace(/\[color=([^\]]+)\]((?:(?!\[color=[^\]]+\]|\[\/color\])[\S\s])*)\[\/color\]/ig, function (match, p1, p2) {
return "<font color='" + p1 + "'>" + p2 + "</font>";
Expand Down

0 comments on commit 66f1e4a

Please sign in to comment.