fuji_markdown 0.3.0 → 0.3.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 +4 -4
- data/.gitignore +50 -6
- data/.travis.yml +4 -2
- data/fuji_markdown.gemspec +1 -1
- data/lib/fuji_markdown/postprocessors/ruby.rb +7 -1
- data/lib/fuji_markdown/version.rb +1 -1
- metadata +5 -7
- data/Gemfile.lock +0 -69
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad62ed44244c8054d2755a8b51709a6955f9a3f8d4934a32aae561c7c1fa22c7
|
4
|
+
data.tar.gz: 67b6b4b9d760c29027c9c8f0410a94965586b9b1836a35450ccee4257506be62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 134866d32bce81be64a6a43f5ba84488f5961c05c49fa46c6d3523987517ef8a2fdb51db932ec3b99243a60c057fde72caa5fb6b0d4c95c5a226aa7b247c6974
|
7
|
+
data.tar.gz: 2d5970164fd3d4bfcde695792faae8d359abc34888cb649bcdf90e2a029f81842827b8397b22c0f7260869aab379793efbfb99ef7a8d961a03b9b3666ebf8c4f
|
data/.gitignore
CHANGED
@@ -1,11 +1,55 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# rspec failure tracking
|
2
|
+
.rspec_status
|
3
|
+
|
4
|
+
### https://raw.github.com/github/gitignore/9da1b5d8ce4e009ff627c4fe49a4488b2a3f60d4/Ruby.gitignore
|
5
|
+
|
6
|
+
*.gem
|
7
|
+
*.rbc
|
8
|
+
/.config
|
4
9
|
/coverage/
|
5
|
-
/
|
10
|
+
/InstalledFiles
|
6
11
|
/pkg/
|
7
12
|
/spec/reports/
|
13
|
+
/spec/examples.txt
|
14
|
+
/test/tmp/
|
15
|
+
/test/version_tmp/
|
8
16
|
/tmp/
|
9
17
|
|
10
|
-
#
|
11
|
-
.
|
18
|
+
# Used by dotenv library to load environment variables.
|
19
|
+
# .env
|
20
|
+
|
21
|
+
## Specific to RubyMotion:
|
22
|
+
.dat*
|
23
|
+
.repl_history
|
24
|
+
build/
|
25
|
+
*.bridgesupport
|
26
|
+
build-iPhoneOS/
|
27
|
+
build-iPhoneSimulator/
|
28
|
+
|
29
|
+
## Specific to RubyMotion (use of CocoaPods):
|
30
|
+
#
|
31
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
32
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
33
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
34
|
+
#
|
35
|
+
# vendor/Pods/
|
36
|
+
|
37
|
+
## Documentation cache and generated files:
|
38
|
+
/.yardoc/
|
39
|
+
/_yardoc/
|
40
|
+
/doc/
|
41
|
+
/rdoc/
|
42
|
+
|
43
|
+
## Environment normalization:
|
44
|
+
/.bundle/
|
45
|
+
/vendor/bundle
|
46
|
+
/lib/bundler/man/
|
47
|
+
|
48
|
+
# for a library or gem, you might want to ignore these files since the code is
|
49
|
+
# intended to run in multiple environments; otherwise, check them in:
|
50
|
+
Gemfile.lock
|
51
|
+
.ruby-version
|
52
|
+
.ruby-gemset
|
53
|
+
|
54
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
55
|
+
.rvmrc
|
data/.travis.yml
CHANGED
data/fuji_markdown.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_dependency 'commonmarker', '~> 0.17'
|
25
25
|
|
26
|
-
spec.add_development_dependency 'bundler', '~>
|
26
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
27
27
|
spec.add_development_dependency 'meowcop'
|
28
28
|
spec.add_development_dependency 'pry'
|
29
29
|
spec.add_development_dependency 'rake', '~> 12.3'
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module FujiMarkdown
|
2
2
|
module Postprocessors
|
3
3
|
class Ruby
|
4
|
+
KANJI_REGEXP = /\A[一-龠々]+\z/.freeze
|
5
|
+
|
4
6
|
attr_reader :omit_start_symbol
|
5
7
|
|
6
8
|
def initialize(omit_start_symbol: false)
|
@@ -41,9 +43,13 @@ module FujiMarkdown
|
|
41
43
|
end
|
42
44
|
|
43
45
|
def convert_to_kakuyomu_ruby!(kanji_node, kana_node)
|
44
|
-
kanji_node.string_content = "|#{kanji_node.string_content}" if kanji_node.type == :text && !(omit_start_symbol && kanji_node
|
46
|
+
kanji_node.string_content = "|#{kanji_node.string_content}" if kanji_node.type == :text && !(omit_start_symbol && start_symbol_omittable?(kanji_node))
|
45
47
|
kana_node.string_content = "《#{kana_node.string_content}》" if kana_node.type == :text
|
46
48
|
end
|
49
|
+
|
50
|
+
def start_symbol_omittable?(kanji_node)
|
51
|
+
kanji_node.string_content.match(KANJI_REGEXP) && !kanji_node.previous.string_content[-1].match(KANJI_REGEXP)
|
52
|
+
end
|
47
53
|
end
|
48
54
|
end
|
49
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuji_markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fuji Nakahara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commonmarker
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: meowcop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +109,6 @@ files:
|
|
109
109
|
- ".travis.yml"
|
110
110
|
- CODE_OF_CONDUCT.md
|
111
111
|
- Gemfile
|
112
|
-
- Gemfile.lock
|
113
112
|
- LICENSE.txt
|
114
113
|
- README.md
|
115
114
|
- Rakefile
|
@@ -145,8 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
144
|
- !ruby/object:Gem::Version
|
146
145
|
version: '0'
|
147
146
|
requirements: []
|
148
|
-
|
149
|
-
rubygems_version: 2.7.6
|
147
|
+
rubygems_version: 3.0.1
|
150
148
|
signing_key:
|
151
149
|
specification_version: 4
|
152
150
|
summary: Markdown processor for Japanese novels
|
data/Gemfile.lock
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
fuji_markdown (0.3.0)
|
5
|
-
commonmarker (~> 0.17)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
ast (2.4.0)
|
11
|
-
coderay (1.1.2)
|
12
|
-
commonmarker (0.18.1)
|
13
|
-
ruby-enum (~> 0.5)
|
14
|
-
concurrent-ruby (1.1.3)
|
15
|
-
diff-lcs (1.3)
|
16
|
-
i18n (1.1.1)
|
17
|
-
concurrent-ruby (~> 1.0)
|
18
|
-
jaro_winkler (1.5.1)
|
19
|
-
meowcop (1.17.1)
|
20
|
-
rubocop (>= 0.57.0)
|
21
|
-
method_source (0.9.1)
|
22
|
-
parallel (1.12.1)
|
23
|
-
parser (2.5.3.0)
|
24
|
-
ast (~> 2.4.0)
|
25
|
-
powerpack (0.1.2)
|
26
|
-
pry (0.12.0)
|
27
|
-
coderay (~> 1.1.0)
|
28
|
-
method_source (~> 0.9.0)
|
29
|
-
rainbow (3.0.0)
|
30
|
-
rake (12.3.1)
|
31
|
-
rspec (3.8.0)
|
32
|
-
rspec-core (~> 3.8.0)
|
33
|
-
rspec-expectations (~> 3.8.0)
|
34
|
-
rspec-mocks (~> 3.8.0)
|
35
|
-
rspec-core (3.8.0)
|
36
|
-
rspec-support (~> 3.8.0)
|
37
|
-
rspec-expectations (3.8.2)
|
38
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
-
rspec-support (~> 3.8.0)
|
40
|
-
rspec-mocks (3.8.0)
|
41
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.8.0)
|
43
|
-
rspec-support (3.8.0)
|
44
|
-
rubocop (0.60.0)
|
45
|
-
jaro_winkler (~> 1.5.1)
|
46
|
-
parallel (~> 1.10)
|
47
|
-
parser (>= 2.5, != 2.5.1.1)
|
48
|
-
powerpack (~> 0.1)
|
49
|
-
rainbow (>= 2.2.2, < 4.0)
|
50
|
-
ruby-progressbar (~> 1.7)
|
51
|
-
unicode-display_width (~> 1.4.0)
|
52
|
-
ruby-enum (0.7.2)
|
53
|
-
i18n
|
54
|
-
ruby-progressbar (1.10.0)
|
55
|
-
unicode-display_width (1.4.0)
|
56
|
-
|
57
|
-
PLATFORMS
|
58
|
-
ruby
|
59
|
-
|
60
|
-
DEPENDENCIES
|
61
|
-
bundler (~> 1.16)
|
62
|
-
fuji_markdown!
|
63
|
-
meowcop
|
64
|
-
pry
|
65
|
-
rake (~> 12.3)
|
66
|
-
rspec (~> 3.7)
|
67
|
-
|
68
|
-
BUNDLED WITH
|
69
|
-
1.17.1
|