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 ca85c126 Allow for missing blank line
ca85c126 is described below
commit ca85c1260ea8f6f6a34aa91c2c869eff8a3381df
Author: Sebb <[email protected]>
AuthorDate: Tue Feb 20 21:27:24 2024 +0000
Allow for missing blank line
---
lib/whimsy/asf/member-files.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/whimsy/asf/member-files.rb b/lib/whimsy/asf/member-files.rb
index 3096786b..1f113e50 100644
--- a/lib/whimsy/asf/member-files.rb
+++ b/lib/whimsy/asf/member-files.rb
@@ -57,7 +57,8 @@ module ASF
.slice_before(/^\s*---+--\s*/)
.drop(2) # instructions and sample block
.each do |block|
- block.shift(2) # divider and blank line
+ block.shift(1) # divider
+ block.shift(1) if block[0]&.strip == '' # Allow for missing blank line
(last block is empty)
nominee = {}
header = nil
block