You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2017/05/19 13:31:01 UTC
[whimsy] branch master updated: Fix up Officer Reports parsing
This is an automated email from the ASF dual-hosted git repository.
sebb 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 47c6ae4 Fix up Officer Reports parsing
47c6ae4 is described below
commit 47c6ae4dcef62ed318783fc329ea761bfe5bef4e
Author: Sebb <se...@apache.org>
AuthorDate: Fri May 19 14:30:59 2017 +0100
Fix up Officer Reports parsing
Match blanks rather than white-space to avoid grabbing newlines
Only match A-Z for the attachment id
---
tools/collate_minutes.rb | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/collate_minutes.rb b/tools/collate_minutes.rb
index 439ace5..8deff68 100755
--- a/tools/collate_minutes.rb
+++ b/tools/collate_minutes.rb
@@ -559,13 +559,15 @@ FileUtils.mkdir_p SITE_MINUTES
end
# parse (Executive) Officer Reports
- execs = minutes[/Officer Reports(.*?)\n\s{1,3}\d+\./m,1]
+ execs = minutes[/Officer Reports(.*?)\n[[:blank:]]{1,3}\d+\./m,1]
if execs
execs.sub! /\s*Executive officer reports approved.*?\n*\Z/, ''
+ # attachments start like this:
+ att_prefix = '\n[[:blank:]]{1,5}([A-Z])\.[[:blank:]]'
execs.scan(/
- \n\s+(\w+)\.\s([^\n]*?)\n # attach, title
+ #{att_prefix}([^\n]*?)\n # attach, title
(.*?) # text
- (?=\n\s+\w\.\s|\Z) # separator
+ (?=#{att_prefix}|\Z) # separator
/mx).each do |attach, title, text|
next unless text
next unless title
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].