index.rb error due to whitespace parsing in read! #69

Closed
tmpfs opened this Issue Dec 29, 2012 · 1 comment

Projects

None yet

2 participants

@tmpfs
Contributor
tmpfs commented Dec 29, 2012

Really like ronn, it's a great tool but I was sometimes getting an error when declaring external URLs in the index.txt file.

The error is here:

https://github.com/rtomayko/ronn/blob/master/lib/ronn/index.rb#L52

Patch is below:

--- index.rb    2012-12-29 22:23:26.000000000 +0100
+++ index.rb.new    2012-12-29 22:21:19.000000000 +0100
@@ -49,7 +49,7 @@
       data.each_line do |line|
         line = line.strip.gsub(/\s*#.*$/, '')
         if !line.empty?
-          name, url = line.split(/ +/, 2)
+          name, url = line.split(/\s+/, 2)
           @references << reference(name, url)
         end
       end
@rtomayko
Owner

Fixed in c3fd67e. Thanks!

@rtomayko rtomayko closed this Jan 29, 2013
@sometimesfood sometimesfood pushed a commit to sometimesfood/ronn that referenced this issue Aug 2, 2014
@rtomayko Allow \t to separate names and urls in index.txt c3fd67e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment