polytexnic 1.9.0 → 1.9.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: 661a979e224cca511cb29bf8b4268cd5a003b2b540dd9a9f249813f448aa346d
4
- data.tar.gz: 740758da8a65f87cd934a4e7ed47525adae3e9760d0a5981f93256f177a7e021
3
+ metadata.gz: 1b5dc960f818c0dd1342080a1d886582ecdd67a8ccf7688cae86e79c18309278
4
+ data.tar.gz: 24f2ce7be9a136c54aacab4a78d47ff17598182c8095038c95c6a215ab0c45f4
5
5
  SHA512:
6
- metadata.gz: 87990735c902b06126f371ee8da891b74c54efe609026a27d333b38653ccfc1e0e34dd1140f8ca50b6ea496b998dee77e481a55eac714de67b60a3ca26b07375
7
- data.tar.gz: 2f535ccba676cd8dc3adea72fe87b8728d7579d0c5ba12004694bdf3a5c59b48621f82a3d8abed39c344063e27a98aa165fdf49cf60cd481534788c95ed324e7
6
+ metadata.gz: e972fa4b84925ef11ac37e246184811bd5630ac3b6036f9609a67dd5816be0e04c53ea15db9e440571f596ad341e88316eeaf488137c61da8395503f0ea0fba1
7
+ data.tar.gz: 1140d6a5159c5c166a8eb3c7db75882a93782b976721e1bac76a7c29439a702a76c1cfcbdc33166090c53adcb2b013663e55a63fb5849147621516a697149c09
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- polytexnic (1.9.0)
4
+ polytexnic (1.9.1)
5
5
  json (= 2.3.1)
6
6
  kramdown (= 2.4.0)
7
7
  msgpack (= 1.2.10)
@@ -419,8 +419,10 @@ module Polytexnic
419
419
  node.add_next_sibling(space)
420
420
  end
421
421
  # Remove spurious intersentence space from mid-sentence notes.
422
+ closing_paren = after && after.content[0] == ")"
422
423
  next_sibling = node.next_sibling
423
- if !end_of_sentence && intersentence_space?(next_sibling)
424
+ if ((!end_of_sentence || closing_paren) &&
425
+ intersentence_space?(next_sibling))
424
426
  next_sibling.remove
425
427
  end
426
428
  end
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.9.0"
2
+ VERSION = "1.9.1"
3
3
  end
@@ -139,6 +139,12 @@ describe 'Polytexnic::Pipeline#to_html' do
139
139
  it { should_not include 'intersentencespace' }
140
140
  end
141
141
 
142
+ context "with parens after a footnote" do
143
+ let(:polytex) { '(Lorem ipsum.\footnote{From \emph{Cicero}.}) Next' }
144
+ it { should include 'ipsum' }
145
+ it { should_not include 'intersentencespace' }
146
+ end
147
+
142
148
  context "with only a newline" do
143
149
  let(:polytex) { "Lorem ipsum.\nDolor sit amet." }
144
150
  it { should resemble "Lorem ipsum.#{intsp} Dolor sit amet." }
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.9.0
4
+ version: 1.9.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: 2023-08-18 00:00:00.000000000 Z
12
+ date: 2023-08-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri