From 24e0555fd350486e21532639597d85e6f405cc2e Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Mon, 19 Apr 2010 15:59:06 -0700 Subject: [PATCH] fix parse_image_tag_options tomdoc --- lib/gollum/markup.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/gollum/markup.rb b/lib/gollum/markup.rb index b7d31f0f..1c3204fb 100644 --- a/lib/gollum/markup.rb +++ b/lib/gollum/markup.rb @@ -137,12 +137,14 @@ module Gollum end end - # Process any attributes present on the image tag and format them as an - # image tag fragment. + # Parse any options present on the image tag and extract them into a + # Hash of option names and values. # # tag - The String tag contents (the stuff inside the double brackets). # - # Returns the String image tag fragment. + # Returns the options Hash: + # key - The String option name. + # val - The String option value or true if it is a binary option. def parse_image_tag_options(tag) tag.split('|')[1..-1].inject({}) do |memo, attr| parts = attr.split('=').map { |x| x.strip }