Project

edumacator

0.0
No commit activity in last 3 years
No release in over 3 years
“Educates” quotes and replaces some other typographic characters like em-dashes (—) and ellipses (…).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 1.8.4
~> 3.12
~> 2.12
~> 0.7.1
 Project Readme

edumacator

“Educates” quotes and replaces some other typographic characters like em-dashes (—) and ellipses (…).

It uses a simple algorithm to identify double quotes, single quotes, and apostrophes. Two dashes are replaced by an em-dash, and three dots, with a space or not, are replaced by an ellipsis.

Edumacator.educate %q{Jim's friend mumbled, "I guess..."}

converts to

Jim’s friend mumbled, “I guess…”

It assumes that the text passed in is plain text. Markup such as HTML will not survive being edumacated:

<img src="cat.gif">

would become

<img src=“cat.gif”>

which wouldn’t work so well.

It also assumes English quoting rules, because nobody agrees how to do it. I’m also guessing that writers in languages that use quotes that aren’t like dumb-quotes will use the correct quotes. Submit an issue if I’m wrong!

See TODO.md for future plans.

Contributing to edumacator

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright (c) 2013 Graham Davison. See LICENSE.txt for further details.