Allow configuration of typographical replacements, e.g. smart quotes

If you're living in a non-UTF-8 character set, then you can configure what quotes are smartly changed.
If my regexes are messing things up, you can also turn this off with smart_quotes: false
Also updated docs.

This closes #50
This commit is contained in:
Andy Meneely
2015-04-07 21:21:00 -04:00
parent beb46a9e1c
commit 063d5156d6
13 changed files with 188 additions and 40 deletions
+2 -2
View File
@@ -44,8 +44,8 @@ describe Squib::Args::Typographer do
expect(t.process(%{can't})).to eq(%{can\u2019t})
end
it "single quotes inside double quotes" do
expect(t.process(%{"'I can't do that', he said"})).to eq(%{\u201C\u2019I can\u2019t do that\u2019, he said\u201D})
it "single quotes inside double quotes" do
expect(t.process(%{"'I can't do that', he said"})).to eq(%{\u201C\u2018I can\u2019t do that\u2019, he said\u201D})
end
it "replaces the straightforward ones" do