You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/04/25 13:42:16 UTC

[whimsy] branch master updated: reduce false flagging of private markers

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 958811a  reduce false flagging of private markers
958811a is described below

commit 958811a447bb35be8c979011593022abc7a62821
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Apr 25 09:41:54 2018 -0400

    reduce false flagging of private markers
---
 www/board/agenda/views/pages/report.js.rb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/views/pages/report.js.rb b/www/board/agenda/views/pages/report.js.rb
index 395234f..8dadae2 100644
--- a/www/board/agenda/views/pages/report.js.rb
+++ b/www/board/agenda/views/pages/report.js.rb
@@ -258,8 +258,11 @@ class Report < Vue
     end
 
     # flag remaining private markers
-    text.gsub! /(.)(&lt;\/?private&gt;)(.)/ do |match, before, text, after|
-      if before == '>' or after == '<'
+    private_tag =/(\s*.\s*)(&lt;\/?private&gt;)(\s*.\s*)/i
+    text.gsub! private_tag do |match, before, text, after|
+      if before.include? '>' or after.include? '<'
+        match
+      elsif before.include? "\n" or after.include? "\n"
         match
       else
         "#{before}<span class='error' " +

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.