On Tuesday 19 October 2004 03:34 pm, gabriele renzi wrote:
| > Actually goes with your '# outputs ...' notation if you use '# => ...'
| > instead.
| >
| >   # This creates a Regexp which will match 3 "foo"s.
| >   # irbprompt>somecode # =>someresult
| >   # irbprompt>somemore # =>someother
| >
| > And I see no good reason to keep the irb prompt so...
| >
| >   # This creates a Regexp which will match 3 "foo"s.
| >   # somecode # =>someresult
| >   # somemore # =>someother
| >
| > Fairly simple transformation from irb.
|
| yes, but that way how would you distinguish code from text... mh.. maybe
| considering just lines with #=> ..

Oops, I was just excluding the extra remark space '#  ' for brevity. But now I 
see that means I have a typo too. This better?

   #   # This creates a Regexp which will match 3 "foo"s.
   #   somecode # =>someresult
   #   somemore # =>someother

But perhaps Mauricio was intending to get rid of the indentation too? In fact 
I was wondering about that. How does it know code from comment? What about 
something like this:

  # Presents a challenge
  # ex--
  #
  #   challenge option
  #
  # There are three options:
  #
  #   jump
  #   sit
  #   stand
  #
  def challenge( option )
    # ...
  end


T.