rtomayko / ronn

the opposite of roff
http://rtomayko.github.com/ronn/
Other
1.36k stars 84 forks source link

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

Closed tmpfs closed 11 years ago

tmpfs commented 11 years ago

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 commented 11 years ago

Fixed in https://github.com/rtomayko/ronn/commit/c3fd67e94094e3e366e958d746c68c2903756294. Thanks!