From c586a66e1ffe129d2429a75bfb15c039ca1f1f95 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 24 Apr 2017 19:40:21 -0500 Subject: [PATCH] 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. --- app/logical/d_text.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/logical/d_text.rb b/app/logical/d_text.rb index a41e6fd98..78aaf56d0 100644 --- a/app/logical/d_text.rb +++ b/app/logical/d_text.rb @@ -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!