X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/437e25b167b3d1f7e4f8c32699de4243cfd59d85..16f704326f44fd1e5e5e60b936c9b5895d6a6ff8:/apps/workbench/config/initializers/redcloth.rb diff --git a/apps/workbench/config/initializers/redcloth.rb b/apps/workbench/config/initializers/redcloth.rb index 4c242dea61..e0d6ac4ce6 100644 --- a/apps/workbench/config/initializers/redcloth.rb +++ b/apps/workbench/config/initializers/redcloth.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module RedClothArvadosLinkExtension class RedClothViewBase < ActionView::Base @@ -14,7 +18,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