File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 case group
4343 when :environment
4444 osl4 = 'https://www.ebi.ac.uk/ols4/ontologies/envo/classes/'
45- purl = 'http://purl.obolibrary.org/obo/ENVO_'
46- envo = osl4 + ERB ::Util . u ( purl )
47- purl = 'http://purl.obolibrary.org/obo/PCO_'
48- pco = osl4 + ERB ::Util . u ( purl )
4945 v . map! do |i |
50- sanitize ( i )
51- . gsub (
52- /(^\s *|[^A-Z\d ])ENVO:(\d {8})(\s *$|[^A-Z\d ])/i ,
53- "\\ 1<a href='#{ envo } \\ 2' target=_blank>ENVO:\\ 2</a>\\ 3"
54- )
55- . gsub (
56- /(^\s *|[^A-Z\d ])PCO:(\d {7})(\s *$|[^A-Z\d ])/i ,
57- "\\ 1<a href='#{ pco } \\ 2' target=_blank>PCO:\\ 2</a>\\ 3"
46+ y = sanitize ( i )
47+ %w[ ENVO PCO OBERON OHMI ] . each do |ont |
48+ purl = "http://purl.obolibrary.org/obo/#{ ont } _"
49+ o_url = osl4 + ERB ::Util . u ( purl )
50+ y = y . gsub (
51+ /(^\s *|[^A-Z\d ])#{ ont } [:_](\d {8})(\s *$|[^A-Z\d ])/i ,
52+ "\\ 1<a href='#{ o_url } \\ 2' target=_blank>ENVO:\\ 2</a>\\ 3"
5853 )
54+ end
55+ y
5956 end
6057 when :toponym
6158 mrg = 'http://marineregions.org/mrgid/'
You can’t perform that action at this time.
0 commit comments