slaw 0.14.1 → 0.14.2

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
  SHA1:
3
- metadata.gz: 9743f6466d2fd51cf2b0ed43330c8eecc7855541
4
- data.tar.gz: 00a887ed43d64cd0788cda9ebe75be7c8a1af9aa
3
+ metadata.gz: 00d35b04f6d4d01a206bf5425face038e0b86f56
4
+ data.tar.gz: 514c2b482ffc969b32bdcd7e0d48cce44f63f979
5
5
  SHA512:
6
- metadata.gz: b2d31f8d468e1dda7b0ee056d12c83fd31cac8e0c647f3a9526dc543ae34a52a5ddb8d3b3299eba310ca5e7fe437594c4686d93570348f16dc98eceba4ad54fe
7
- data.tar.gz: 93b9c10f53b69c939b1a90347355561ab07af581aee1f155415a937a55f8f3238a03a4e31c859fdea895aa1bd8f9023f472ec82bfe87c1b6d4c109c8c8f1d630
6
+ metadata.gz: f4e0f3eda7310ad7bc60ff57e19e7151f55d4736fb9beffabe560311c97a611fe870833593f96c7ac7829c1deec2e31f91e2d1c54729f8f1c8ced9fdcb369408
7
+ data.tar.gz: d48951afdc9be70b291451356a1e560a4d10bf8ce03e06387ce6c87c8a635878bb3b57e8fd1a3f0df802005af7ad0366e1286c8623866ca5fef9f85f854b3ae1
data/README.md CHANGED
@@ -218,6 +218,10 @@ Akoma Ntoso `component` elements at the end of the XML document, with a name of
218
218
 
219
219
  ## Changelog
220
220
 
221
+ ### 0.14.2
222
+
223
+ * Convert non-breaking space (\xA0) to space
224
+
221
225
  ### 0.14.1
222
226
 
223
227
  * Support links in remarks
@@ -57,7 +57,8 @@ module Slaw
57
57
 
58
58
  # tabs to spaces
59
59
  def expand_tabs(s)
60
- s.gsub(/\t/, ' ')
60
+ s.gsub(/\t/, ' ')\
61
+ .gsub("\u00A0", ' ') # non-breaking space
61
62
  end
62
63
 
63
64
  # Try to remove boilerplate lines found in many files, such as page numbers.
data/lib/slaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "0.14.1"
2
+ VERSION = "0.14.2"
3
3
  end
@@ -11,6 +11,12 @@ describe Slaw::Parse::Cleanser do
11
11
  end
12
12
  end
13
13
 
14
+ describe '#expand_tabs' do
15
+ it 'should expand nbsp' do
16
+ subject.expand_tabs("foo \u00A0bar").should == "foo bar"
17
+ end
18
+ end
19
+
14
20
  describe '#unbreak_lines' do
15
21
  it 'should unbreak simple lines' do
16
22
  subject.unbreak_lines("""
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kempe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-01 00:00:00.000000000 Z
11
+ date: 2017-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler