jmcnevin / rubypants

RubyPants: SmartyPants for Ruby
Other
29 stars 20 forks source link

Add support for french quotes (« and ») #2

Closed iamweird closed 8 years ago

iamweird commented 10 years ago

Hi, I'm using RubyPants with Jekyll + Redcarpet on my website. My website is in Russian and by the Russian typography rules, «French quotes» (« and ») are required instead of straight quotes(' and ") or curly quotes - ‘single’ (‘ and ’) or “double” (“ and ”).

Is there any chance to get a setting to switch quote type? Or maybe I'm missing existing one.

Thanks!

jmcnevin commented 10 years ago

Heya... I posted this code, unmodified, to GitHub ages ago, but have never really attempted to do much more with it.

I've attempted to add this feature to it, and will see if I can get these updates pushed out to RubyGems.org (I am not the gem's current owner).

agriffis commented 8 years ago

@iamweird You should be able to do this by calling with a modified entities hash. For example:

entities = {
  :double_left_quote => '«',
  :double_right_quote => '»'
}
RubyPants.new(str, [2], entities).to_html