whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: reduce false flagging of private markers
Date Wed, 25 Apr 2018 13:42:16 GMT
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 <rubys@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.

Mime
View raw message