Show
Ignore:
Timestamp:
28-01-11 16:05:25 (3 years ago)
Author:
kostas.karasavvas@…
Message:

designed multiple solutions (use 'prettiest' one) for displaying as nicely as possible multiline input examples (can be improved!)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • galaxy-taverna/workflow-to-galaxy/lib/workflow-to-galaxy/generator.rb

    r81 r82  
    114114          i.examples.each do |ex| 
    115115            # some examples have a newline between them that breaks Galaxy's GUI 
    116             # so we remove it 
    117             out.write "  - " + ex.to_s.gsub(/[\n]/, ' ') + "\n" 
     116            # so we substitute it with ' ' 
     117            #out.write "  - " + ex.to_s.gsub(/[\n]/, ' ') + "\n" 
     118 
     119            # We could substitute them with with 
 that works for HTML (e.g. wkf 1180) 
     120            # But if an example input is truly multiline then input descr. will 
     121            # display them all as separate inputs... 
     122            out.write "  - " + ex.to_s.gsub(/[\n]/, '
  - ') + "\n" 
     123  
     124            # display example inputs as verbatim/literal so it is not our responsibility!! 
     125            # add indendation after each newline to specify the literal block 
     126            # TODO this looks ugly if we don't remove all the bullet points! 
     127            #out.write "::\n\n  " + ex.to_s.gsub(/\n/, '
  ') + "\n" 
    118128          end 
    119129        end