polytexnic 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18ed75afaa6f86f72c3b3c93a58b98de889e61d6375e7b7cd7ab338bdaae4eb5
4
- data.tar.gz: 9d163095bab205273f9198d89ca931d1bb69a74faac6be586a38549a10e11d08
3
+ metadata.gz: 6095a0ec5936b87a0a296c91bc61b772197013bade5d9a28f7045f78f3221583
4
+ data.tar.gz: 4e4af1905ea37ff5d8a124a209d6c6c49faa672433156b91590cf712324012db
5
5
  SHA512:
6
- metadata.gz: 8c53d66257b3f6a4b607508fc4a043eb253844a3980e43c24823867651f4bee92d51a9a2d553eaba0a6d3da93e39147d22c1c8b46dc2b76767dc8780779f423c
7
- data.tar.gz: d9453ea5eafc5b9819a011e7355bc309391f320a45bd83c53bb797c361204fd38914967b25d3e74058ab2c7bf8cc442d39cfeb91a119d0a543eb7f5f846d474c
6
+ metadata.gz: 3320219ee29e5e0bb74fdc702aa80ad51554ed7ef810833c657f805128a0db01f22940c04a9668e7e54a2cbd0ecbb8eb3dd697da3ac7af2a16c81f7d7d7866cc
7
+ data.tar.gz: b804d40cf685c3db85f0327fb4a22aab99dca3875755dab4052db4679cdf3131ded4e1dac3ea4883b9811beb1361a5a76101d9732da6f441ad822f1c0673794e
@@ -83,6 +83,10 @@ module Polytexnic
83
83
  doc.gsub!(/(#{not_a_capital})(#{end_of_sentence})(\}+)[ ]+([^\s])/) do
84
84
  $1 + $2 + $3 + xmlelement('intersentencespace') + ' ' + $4
85
85
  end
86
+ # Case of "foo.'') A"
87
+ doc.gsub!(/(#{not_a_capital})(#{end_of_sentence})('+)(\))[ ]+([^\s])/) do
88
+ $1 + $2 + $3 + $4 + xmlelement('intersentencespace') + ' ' + $5
89
+ end
86
90
  # Handle the manual override to force an intersentence space, '\@',
87
91
  # as in 'Superman II\@. A new sentence'.
88
92
  doc.gsub!(/\\@\. /, '.' + xmlelement('intersentencespace') + ' ')
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
@@ -93,6 +93,16 @@ describe 'Polytexnic::Pipeline#to_html' do
93
93
  it { should resemble "#{intsp} Bar" }
94
94
  end
95
95
 
96
+ context "with a sentence ending with single quote and a paren" do
97
+ let(:polytex) { "(It 'isn't.') Is it?"}
98
+ it { should resemble "(It ’isn’t.’)#{intsp} Is it?" }
99
+ end
100
+
101
+ context "with a sentence ending with double quotes and a paren" do
102
+ let(:polytex) { "(It ''isn't.'') Is it?"}
103
+ it { should resemble "(It ”isn’t.”)#{intsp} Is it?" }
104
+ end
105
+
96
106
  context "with a mid-sentence footnote ending with a period" do
97
107
  let(:polytex) { 'Lorem\footnote{From \emph{Cicero}.} ipsum.' }
98
108
  it { should include 'ipsum' }
@@ -146,4 +156,4 @@ describe 'Polytexnic::Pipeline#to_html' do
146
156
  it { should include(output) }
147
157
  end
148
158
  end
149
- end
159
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytexnic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-05-27 00:00:00.000000000 Z
12
+ date: 2018-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri