Ignore:
Timestamp:
Jan 28, 2011, 4:05:25 PM (6 years ago)
Author:
kostas.karasavvas@…
Message:

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

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.