Ruby Forum Redcloth > entities and spacing: (em|en)dash and arrow

Posted by Johan Sørensen (Guest)
on 04.01.2008 15:34
(Received via mailing list)
Hello,
I notice that these entities are defined like this:

  def emdash opts
    "—"
  end
  def endash opts
    "–"
  end
  def arrow opts
    "→"
  end

However, any space from the original markup is stripped, so "hello -- 
world"
becomes "hello—world". I've overridden the methods to deal with 
this:

  def emdash opts
    " — "
  end
  def endash opts
    " – "
  end
  def arrow opts
    " → "
  end

however, I'm not sure if this is the responsibility of the scanner after
all, for these three?

JS