X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b04638275cff9b393e1bc04136d44f361b999cf8..b5d352d6099b60db5dcdd9183dcab3e8e17d729e:/apps/workbench/app/helpers/application_helper.rb?ds=sidebyside diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 41b33706d1..0f60bcd65b 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -670,6 +670,12 @@ module ApplicationHelper render_runtime duration, use_words, round_to_min end + # Keep locators are expected to be of the form \"...\" + JSON_KEEP_LOCATOR_REGEXP = /(.*)(([0-9a-f]{32}\+\d+)(.*)\"(.*))/ + def keep_locator_in_json str + JSON_KEEP_LOCATOR_REGEXP.match str + end + private def is_textile?( object, attr ) is_textile = object.textile_attributes.andand.include?(attr)