polytexnic 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6095a0ec5936b87a0a296c91bc61b772197013bade5d9a28f7045f78f3221583
|
|
4
|
+
data.tar.gz: 4e4af1905ea37ff5d8a124a209d6c6c49faa672433156b91590cf712324012db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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') + ' ')
|
data/lib/polytexnic/version.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
12
|
+
date: 2018-05-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|