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: handle multiple private sections and allow lines that exceed 80 columns only due to containing HTML entities.
Date Tue, 20 Jun 2017 15:55:46 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 b3b47cc  handle multiple private sections and allow lines that exceed 80 columns
only due to containing HTML entities.
b3b47cc is described below

commit b3b47cc15fa68efecfe90ada4140ff2227f3fa0e
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue Jun 20 11:54:51 2017 -0400

    handle multiple private sections and allow lines that exceed 80
    columns only due to containing HTML entities.
---
 www/board/agenda/views/pages/report.js.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/pages/report.js.rb b/www/board/agenda/views/pages/report.js.rb
index f11c8db..23763dd 100644
--- a/www/board/agenda/views/pages/report.js.rb
+++ b/www/board/agenda/views/pages/report.js.rb
@@ -104,6 +104,8 @@ class Report < React
     indicies = [];
     while result = regex.exec(text)
       line = result[0]
+      break if line.gsub(/\&\w+;/, '.').length < 80
+
       lastspace = /^.*\s\S/.exec(line)
       if lastspace and lastspace[0].length - 1 > 40
         indicies.unshift([line, result.index]) 
@@ -235,7 +237,8 @@ class Report < React
   def privates(text)
     # inline <private>...</private> sections (and preceding spaces and tabs)
     # where the <private> and </private> are on the same line.
-    private_inline = /([ \t]*&lt;private&gt;.*?&lt;\/private&gt;)/
+    private_inline = Regexp.new('([ \t]*&lt;private&gt;.*?&lt;\/private&gt;)',
+      'ig')
 
     # block of lines (and preceding whitespace) where the first line starts
     # with <private> and the last line ends </private>.

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message