dtext: recognize [QUOTE] tags when quoting comments, forum_posts.

Fixes a bug with capitalized [QUOTE] tags not being handled properly
when quoting comments or forum posts.
This commit is contained in:
evazion
2017-04-24 19:40:21 -05:00
parent 869f1610fc
commit c586a66e1f

View File

@@ -22,8 +22,8 @@ class DText
stripped = ""
string = string.dup
string.gsub!(/\s*\[#{tag}\](?!\])\s*/m, "\n\n[#{tag}]\n\n")
string.gsub!(/\s*\[\/#{tag}\]\s*/m, "\n\n[/#{tag}]\n\n")
string.gsub!(/\s*\[#{tag}\](?!\])\s*/mi, "\n\n[#{tag}]\n\n")
string.gsub!(/\s*\[\/#{tag}\]\s*/mi, "\n\n[/#{tag}]\n\n")
string.gsub!(/(?:\r?\n){3,}/, "\n\n")
string.strip!