hitomalu_formatter 0.1.4 → 0.1.5
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 +4 -4
- data/CHANGELOG.md +1 -0
- data/Gemfile.lock +1 -1
- data/lib/hitomalu_formatter/formatter.rb +1 -1
- data/lib/hitomalu_formatter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92b65e324f9f9163600a9af6e03d864592d0a7780f6d040201d203756b746c25
|
|
4
|
+
data.tar.gz: 6071e129eab94156b61d2715c7e7d7bc296cebb28ca32988ff97af415c5af861
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38a235ffe10dddd9d1535f4de5db56fe69f5f21a656566b917abd943acf193728921e30975418b04f2fb43092cf70e2493ccd1072bd65f271c479d8e447bc8a2
|
|
7
|
+
data.tar.gz: 121844e97893f54f05d3ffb4f1f5d6a254a6c72fd49a444667ca3f8d8d7b506b95e7b790abe74e23a4507aa9846631a3520b969cefa15dc2f69e00a4677fe56c
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -89,7 +89,7 @@ module Hitomalu
|
|
|
89
89
|
# 英文など、スペースが重要な言語があるので、stripはしない (Hello <a href="#world">world</a> のような文でスペースが、stripで無くなってしまう)
|
|
90
90
|
# \r\n を 2文字で1つのもの扱いにするため \s ではなく () で列挙している
|
|
91
91
|
# 連続する改行・スペースをスペース1つにし、先頭と最後の改行・スペースを除去し、文中の改行を除去する
|
|
92
|
-
if node.instance_of?(Nokogiri::XML::Text) &&
|
|
92
|
+
if node.instance_of?(Nokogiri::XML::Text) && (CONTENT_NO_MODIFY_TAGS & node.ancestors.map do |ancestor| ancestor.name end).empty?
|
|
93
93
|
node.content = node.content.gsub(/(\r\n|\n| |\t|\f){2,}/, " ").gsub(/(\A ?(\r\n|\n) ?| ?(\r\n|\n) ?\Z)/, " ").gsub("\r\n", " ")
|
|
94
94
|
end
|
|
95
95
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hitomalu_formatter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- t-hazawa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-08-
|
|
11
|
+
date: 2022-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email: []
|