3354: ordinary Textile link markup was no longer working - fixed by checking to see...
authorPhil Hodgson <bitbucket@philhodgson.net>
Sun, 24 Aug 2014 17:08:49 +0000 (13:08 -0400)
committerPhil Hodgson <bitbucket@philhodgson.net>
Sun, 24 Aug 2014 17:08:49 +0000 (13:08 -0400)
apps/workbench/config/initializers/redcloth.rb

index 4c242dea61d881dc85165a7f4900368b3f3c27be..8a02913fc2da0bfb0fbfe7925aa3bb398aa938c4 100644 (file)
@@ -14,7 +14,8 @@ module RedClothArvadosLinkExtension
     text.gsub!(/"(?!\s)([^"]*\S)":(\S+)/) do
       text, link = $~[1..2]
       arvados_link = RedClothViewBase.new.helper_link_to_if_arvados_object(link, { :link_text => text })
-      arvados_link ? arvados_link : "#{text}:#{link}"
+      # if it's not an arvados_link the helper will return the link unprocessed and so we will reconstruct the textile link string so it can be processed normally
+      (arvados_link == link) ? "\"#{text}\":#{link}" : arvados_link
     end
   end
 end