amakanize 0.1.4 → 0.1.5

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: 5974a63a6920c1a1136a73637dfae4c78e5977d6
4
- data.tar.gz: 53257725ca96847e18ce4b6d6370865fe50c7d85
3
+ metadata.gz: 64b96abe99798d7ccb7de06558d5ef986757c622
4
+ data.tar.gz: 97d48403adc0544866b0c4d404e8566a8a145421
5
5
  SHA512:
6
- metadata.gz: 40c1012e35026332b2e3fa962e1148dabbdf5a9f77ef354a8aab8c337d7311ed1e1e8e7a67fb4508ec68d7320ad965bedd49034335e6e71b8553f2ca28cc583d
7
- data.tar.gz: a264b709b288e6b967764fef32f5f59bb0f0515b0407794679f2bc4892fe55a9bd1f3034ee5dcb83683f313139d18bb73d815e1ff979d8aa9874a8b8d85fea62
6
+ metadata.gz: 286377a17de01855aed5be495ac111487ed80e3ad0b630f0815b49d28d03d37fa0b3d47bf9d0ccd3ade029325a4c84d2ec2f9159e22dfa610c0eeb48fe3fba14
7
+ data.tar.gz: f3fe64d424b39b75266b026da1f6370c05f3aceb34f7b09b4a1c618c11f57e2e1f21e6e468122618a26624c49e6804c4bf6615ebc975608ef64cd84d50bc2279
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.5
2
+ - Remove spaces between exclamations for 「ばくおん! !」
3
+
1
4
  ## 0.1.4
2
5
  - Add more author name separator
3
6
  - Remove suffix role name
@@ -0,0 +1,12 @@
1
+ module Amakanize
2
+ module Filters
3
+ class SpacesBetweenExclamationsDeletionFilter < BaseFilter
4
+ # @note Override
5
+ # @param string [String] e.g. `"ばくおん! !"`
6
+ # @return [String] e.g. `"ばくおん!!"`
7
+ def call(string)
8
+ string.gsub(/!\s+!/, "!!")
9
+ end
10
+ end
11
+ end
12
+ end
@@ -6,6 +6,7 @@ module Amakanize
6
6
  @filters ||= [
7
7
  ::Amakanize::Filters::HtmlUnescapeFilter.new,
8
8
  ::Amakanize::Filters::NormalizationFilter.new,
9
+ ::Amakanize::Filters::SpacesBetweenExclamationsDeletionFilter.new,
9
10
  ::Amakanize::Filters::TrailingParenthesesDeletionFilter.new,
10
11
  ::Amakanize::Filters::TrailingVolumeNumberDeletionFilter.new,
11
12
  ::Amakanize::Filters::TrailingSeriesNamePayloadDeletionFilter.new,
@@ -1,3 +1,3 @@
1
1
  module Amakanize
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/amakanize.rb CHANGED
@@ -6,6 +6,7 @@ require "amakanize/filters/normalization_filter"
6
6
  require "amakanize/filters/parentheses_deletion_filter"
7
7
  require "amakanize/filters/role_name_deletion_filter"
8
8
  require "amakanize/filters/space_deletion_filter"
9
+ require "amakanize/filters/spaces_between_exclamations_deletion_filter"
9
10
  require "amakanize/filters/strip_filter"
10
11
  require "amakanize/filters/trailing_author_name_payload_deletion_filter"
11
12
  require "amakanize/filters/trailing_parentheses_deletion_filter"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amakanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - r7kamura
@@ -93,6 +93,7 @@ files:
93
93
  - lib/amakanize/filters/parentheses_deletion_filter.rb
94
94
  - lib/amakanize/filters/role_name_deletion_filter.rb
95
95
  - lib/amakanize/filters/space_deletion_filter.rb
96
+ - lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
96
97
  - lib/amakanize/filters/strip_filter.rb
97
98
  - lib/amakanize/filters/trailing_author_name_payload_deletion_filter.rb
98
99
  - lib/amakanize/filters/trailing_parentheses_deletion_filter.rb