lm_docstache 2.0.1 → 2.0.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
  SHA256:
3
- metadata.gz: e91a22653fad2e7b3afb24e170d5c8ccc8d7c5153b2a8b7cdc8caae19643e158
4
- data.tar.gz: 9225014ab71170af0d2cfba5050d1202a531daf125a56b7c921b9beaeb3e2fa4
3
+ metadata.gz: 1e32cdd0e7cb785ccb74285d2df67556c6ae24184a49511dd08fa6aa523e845c
4
+ data.tar.gz: d5872f502d4e95d4135dfcf3014826c76fa3968db8be301e4cc52d73d04b9951
5
5
  SHA512:
6
- metadata.gz: 2fa5b87cddcbb5e3d6c43dc8f0f4a27f2b3f0a192c9a8dd8973ea7107d69ed53959d95c8d17dc422360e225b3c3943519a46491988e03c64da494c01da4b801c
7
- data.tar.gz: fb75e6b190061328b857a82a967514fe4ba28a8ff983ad314d3f6fcebd2c3135b3700cc28a8353fcbad0eddcb488806fcd78ea8c51bafe0d3ee28ad5447d10ab
6
+ metadata.gz: 65852b8af255a23a06064bc91eee802005f31cdff3e3fc3258cbb03fbec9ba07e2f0c5cbd0af37f25324db2df774070280596a87fb49e2332d28a368514ca837
7
+ data.tar.gz: 85ebb2d3d2af5a0a3c7e3787a8ba98688193e220e56aceba5b37aa3ac500a39fc3914f6d14251d4f4007a317e677d41cf6b8fd7a98e4d51960e441abac40a59a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### Improvements and bugfixes
6
+
7
+ * Fix a bug related to a bad empty text nodes handling approach inside
8
+ `Document#flatten_paragraph` logic.
9
+
3
10
  ## 2.0.1
4
11
 
5
12
  ### Improvements and bugfixes
@@ -135,10 +135,12 @@ module LMDocstache
135
135
  previous_run_node = run_nodes.last
136
136
  previous_style_node = previous_run_node.at_css('w|rPr')
137
137
  previous_style_html = previous_style_node ? previous_style_node.inner_html : ''
138
+ previous_text_node = previous_run_node.at_css('w|t')
139
+ current_text_node = run_node.at_css('w|t')
138
140
 
139
141
  next if style_html != previous_style_html
142
+ next if current_text_node.nil? || previous_text_node.nil?
140
143
 
141
- previous_text_node = previous_run_node.at_css('w|t')
142
144
  previous_text_node.content = previous_text_node.text + run_node.text
143
145
  run_node.unlink
144
146
  end
@@ -1,3 +1,3 @@
1
1
  module LMDocstache
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lm_docstache
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roey Chasman
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2021-03-08 00:00:00.000000000 Z
15
+ date: 2021-03-09 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: nokogiri