markdown_formatter 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +1 -0
  4. data/.gitignore +12 -0
  5. data/.rspec +3 -0
  6. data/.travis.yml +5 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +46 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/exe/mdfmt +27 -0
  14. data/lib/markdown_formatter.rb +57 -0
  15. data/lib/markdown_formatter/ast.rb +47 -0
  16. data/lib/markdown_formatter/cli.rb +13 -0
  17. data/lib/markdown_formatter/nodes/base.rb +11 -0
  18. data/lib/markdown_formatter/nodes/blank.rb +9 -0
  19. data/lib/markdown_formatter/nodes/block_quote.rb +22 -0
  20. data/lib/markdown_formatter/nodes/code_block.rb +9 -0
  21. data/lib/markdown_formatter/nodes/code_span.rb +9 -0
  22. data/lib/markdown_formatter/nodes/container_block.rb +23 -0
  23. data/lib/markdown_formatter/nodes/emphasis.rb +10 -0
  24. data/lib/markdown_formatter/nodes/entity.rb +9 -0
  25. data/lib/markdown_formatter/nodes/footnote.rb +9 -0
  26. data/lib/markdown_formatter/nodes/header.rb +9 -0
  27. data/lib/markdown_formatter/nodes/html_element.rb +9 -0
  28. data/lib/markdown_formatter/nodes/image.rb +9 -0
  29. data/lib/markdown_formatter/nodes/inline.rb +29 -0
  30. data/lib/markdown_formatter/nodes/leaf_block.rb +27 -0
  31. data/lib/markdown_formatter/nodes/link.rb +9 -0
  32. data/lib/markdown_formatter/nodes/list.rb +23 -0
  33. data/lib/markdown_formatter/nodes/list_item.rb +38 -0
  34. data/lib/markdown_formatter/nodes/paragraph.rb +39 -0
  35. data/lib/markdown_formatter/nodes/smart_quote.rb +14 -0
  36. data/lib/markdown_formatter/nodes/strong.rb +10 -0
  37. data/lib/markdown_formatter/nodes/thematic_break.rb +9 -0
  38. data/lib/markdown_formatter/nodes/typographic_sym.rb +9 -0
  39. data/lib/markdown_formatter/version.rb +3 -0
  40. data/lib/monkey_patches/kramdown/parser/gfm.rb +21 -0
  41. data/lib/monkey_patches/kramdown/parser/kramdown/autolink.rb +16 -0
  42. data/lib/monkey_patches/kramdown/parser/kramdown/blockquote.rb +22 -0
  43. data/lib/monkey_patches/kramdown/parser/kramdown/code_block.rb +34 -0
  44. data/lib/monkey_patches/kramdown/parser/kramdown/code_span.rb +31 -0
  45. data/lib/monkey_patches/kramdown/parser/kramdown/emphasis.rb +48 -0
  46. data/lib/monkey_patches/kramdown/parser/kramdown/escaped_chars.rb +12 -0
  47. data/lib/monkey_patches/kramdown/parser/kramdown/footnote.rb +27 -0
  48. data/lib/monkey_patches/kramdown/parser/kramdown/header.rb +38 -0
  49. data/lib/monkey_patches/kramdown/parser/kramdown/horizontal_rule.rb +14 -0
  50. data/lib/monkey_patches/kramdown/parser/kramdown/html.rb +60 -0
  51. data/lib/monkey_patches/kramdown/parser/kramdown/link.rb +116 -0
  52. data/lib/monkey_patches/kramdown/parser/kramdown/list.rb +115 -0
  53. data/lib/monkey_patches/kramdown/parser/kramdown/paragraph.rb +26 -0
  54. data/lib/monkey_patches/kramdown/parser/kramdown/typographic_symbol.rb +26 -0
  55. data/lib/monkey_patches/kramdown/utils/entities.rb +1911 -0
  56. data/markdown_formatter.gemspec +29 -0
  57. metadata +192 -0
  58. metadata.gz.sig +0 -0
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "markdown_formatter/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "markdown_formatter"
8
+ spec.version = MarkdownFormatter::VERSION
9
+ spec.authors = ["siman-man"]
10
+ spec.email = ["k128585@ie.u-ryukyu.ac.jp"]
11
+
12
+ spec.summary = %q{Markdown formatter that removes unnecessary newlines, written in Ruby.}
13
+ spec.homepage = "https://github.com/yasslab/markdown_formatter"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_runtime_dependency "kramdown", "~> 1.14.0"
24
+ spec.add_runtime_dependency "activesupport", "~> 5.1.2"
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.15"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rspec", "~> 3.0"
29
+ end
metadata ADDED
@@ -0,0 +1,192 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: markdown_formatter
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - siman-man
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIID0jCCArqgAwIBAgIBATANBgkqhkiG9w0BAQUFADBoMRAwDgYDVQQDDAdrMTI4
14
+ NTg1MRIwEAYKCZImiZPyLGQBGRYCaWUxGDAWBgoJkiaJk/IsZAEZFgh1LXJ5dWt5
15
+ dTESMBAGCgmSJomT8ixkARkWAmFjMRIwEAYKCZImiZPyLGQBGRYCanAwHhcNMTcw
16
+ NTEyMDg0MzI4WhcNMTgwNTEyMDg0MzI4WjBoMRAwDgYDVQQDDAdrMTI4NTg1MRIw
17
+ EAYKCZImiZPyLGQBGRYCaWUxGDAWBgoJkiaJk/IsZAEZFgh1LXJ5dWt5dTESMBAG
18
+ CgmSJomT8ixkARkWAmFjMRIwEAYKCZImiZPyLGQBGRYCanAwggEiMA0GCSqGSIb3
19
+ DQEBAQUAA4IBDwAwggEKAoIBAQDhT8SPklRNY2T0/6okadJNRaqDTwHHY5q0qPzl
20
+ 0oujYej1lP2C4U2FncEyjC+Z+yAakkj0+X6F7JCc+OhOUBOOkBZPt2VF/QqWaGOZ
21
+ N4QmBYs+MZulAKh8jI1X5nfLjVdyqcumlz4KdfeQBU80hiHF1Uw5W7zAbZS71yQ2
22
+ kwSZckteT9JU3seZg0K0e9/AaXXeKGjCDI0THfa9uB2kZ2d3IhOKWColKlHmw8aw
23
+ xtTU3WVJRGZbnjblPVjb+usasbmIWc+dYtAmwUdB35vK3YgVrlbjHNFhxgytH78Q
24
+ apnc/5nBgYnI10sjqVJUfG1sh96jxwR9eGJR4Xl5tHcWvoN3AgMBAAGjgYYwgYMw
25
+ CQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFDTJcguBmHUquwQKqeNZ
26
+ 7GDtU1QDMCQGA1UdEQQdMBuBGWsxMjg1ODVAaWUudS1yeXVreXUuYWMuanAwJAYD
27
+ VR0SBB0wG4EZazEyODU4NUBpZS51LXJ5dWt5dS5hYy5qcDANBgkqhkiG9w0BAQUF
28
+ AAOCAQEAyfJKJtV98mZEvXU+grxn40blFVmgzMNhKGVAJI1YDy6X2LW50CvCUXBb
29
+ WIbO58QHwXvsytMGbMHggCYTLvHcYXArXnEMBJdACt1LoufAUIxytIkqdXtBtNuM
30
+ zT1+OBWvES2aeKcx+g7gcbAc5DicNMtdLHCbenjhR1glcHWXdasoKQ6HrVekm2fp
31
+ zzZxEHIvijfuL7FyNm9YraQd10vNG433pLsTMxIry/d29pssgbq+T6V3ez560If8
32
+ FDRi8p0CR5Kr8eZGeaIfpMKn4nbQQq4w5wLzNxnecBb26xn4EPHn3dVLF24+NJkf
33
+ BLzd24MyvHKRaGDWAmiJAd9Z04Vkyw==
34
+ -----END CERTIFICATE-----
35
+ date: 2017-07-12 00:00:00.000000000 Z
36
+ dependencies:
37
+ - !ruby/object:Gem::Dependency
38
+ name: kramdown
39
+ requirement: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: 1.14.0
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - "~>"
49
+ - !ruby/object:Gem::Version
50
+ version: 1.14.0
51
+ - !ruby/object:Gem::Dependency
52
+ name: activesupport
53
+ requirement: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: 5.1.2
58
+ type: :runtime
59
+ prerelease: false
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - "~>"
63
+ - !ruby/object:Gem::Version
64
+ version: 5.1.2
65
+ - !ruby/object:Gem::Dependency
66
+ name: bundler
67
+ requirement: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '1.15'
72
+ type: :development
73
+ prerelease: false
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - "~>"
77
+ - !ruby/object:Gem::Version
78
+ version: '1.15'
79
+ - !ruby/object:Gem::Dependency
80
+ name: rake
81
+ requirement: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '10.0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - "~>"
91
+ - !ruby/object:Gem::Version
92
+ version: '10.0'
93
+ - !ruby/object:Gem::Dependency
94
+ name: rspec
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '3.0'
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - "~>"
105
+ - !ruby/object:Gem::Version
106
+ version: '3.0'
107
+ description:
108
+ email:
109
+ - k128585@ie.u-ryukyu.ac.jp
110
+ executables:
111
+ - mdfmt
112
+ extensions: []
113
+ extra_rdoc_files: []
114
+ files:
115
+ - ".gitignore"
116
+ - ".rspec"
117
+ - ".travis.yml"
118
+ - Gemfile
119
+ - LICENSE.txt
120
+ - README.md
121
+ - Rakefile
122
+ - bin/console
123
+ - bin/setup
124
+ - exe/mdfmt
125
+ - lib/markdown_formatter.rb
126
+ - lib/markdown_formatter/ast.rb
127
+ - lib/markdown_formatter/cli.rb
128
+ - lib/markdown_formatter/nodes/base.rb
129
+ - lib/markdown_formatter/nodes/blank.rb
130
+ - lib/markdown_formatter/nodes/block_quote.rb
131
+ - lib/markdown_formatter/nodes/code_block.rb
132
+ - lib/markdown_formatter/nodes/code_span.rb
133
+ - lib/markdown_formatter/nodes/container_block.rb
134
+ - lib/markdown_formatter/nodes/emphasis.rb
135
+ - lib/markdown_formatter/nodes/entity.rb
136
+ - lib/markdown_formatter/nodes/footnote.rb
137
+ - lib/markdown_formatter/nodes/header.rb
138
+ - lib/markdown_formatter/nodes/html_element.rb
139
+ - lib/markdown_formatter/nodes/image.rb
140
+ - lib/markdown_formatter/nodes/inline.rb
141
+ - lib/markdown_formatter/nodes/leaf_block.rb
142
+ - lib/markdown_formatter/nodes/link.rb
143
+ - lib/markdown_formatter/nodes/list.rb
144
+ - lib/markdown_formatter/nodes/list_item.rb
145
+ - lib/markdown_formatter/nodes/paragraph.rb
146
+ - lib/markdown_formatter/nodes/smart_quote.rb
147
+ - lib/markdown_formatter/nodes/strong.rb
148
+ - lib/markdown_formatter/nodes/thematic_break.rb
149
+ - lib/markdown_formatter/nodes/typographic_sym.rb
150
+ - lib/markdown_formatter/version.rb
151
+ - lib/monkey_patches/kramdown/parser/gfm.rb
152
+ - lib/monkey_patches/kramdown/parser/kramdown/autolink.rb
153
+ - lib/monkey_patches/kramdown/parser/kramdown/blockquote.rb
154
+ - lib/monkey_patches/kramdown/parser/kramdown/code_block.rb
155
+ - lib/monkey_patches/kramdown/parser/kramdown/code_span.rb
156
+ - lib/monkey_patches/kramdown/parser/kramdown/emphasis.rb
157
+ - lib/monkey_patches/kramdown/parser/kramdown/escaped_chars.rb
158
+ - lib/monkey_patches/kramdown/parser/kramdown/footnote.rb
159
+ - lib/monkey_patches/kramdown/parser/kramdown/header.rb
160
+ - lib/monkey_patches/kramdown/parser/kramdown/horizontal_rule.rb
161
+ - lib/monkey_patches/kramdown/parser/kramdown/html.rb
162
+ - lib/monkey_patches/kramdown/parser/kramdown/link.rb
163
+ - lib/monkey_patches/kramdown/parser/kramdown/list.rb
164
+ - lib/monkey_patches/kramdown/parser/kramdown/paragraph.rb
165
+ - lib/monkey_patches/kramdown/parser/kramdown/typographic_symbol.rb
166
+ - lib/monkey_patches/kramdown/utils/entities.rb
167
+ - markdown_formatter.gemspec
168
+ homepage: https://github.com/yasslab/markdown_formatter
169
+ licenses:
170
+ - MIT
171
+ metadata: {}
172
+ post_install_message:
173
+ rdoc_options: []
174
+ require_paths:
175
+ - lib
176
+ required_ruby_version: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ required_rubygems_version: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ requirements: []
187
+ rubyforge_project:
188
+ rubygems_version: 2.6.11
189
+ signing_key:
190
+ specification_version: 4
191
+ summary: Markdown formatter that removes unnecessary newlines, written in Ruby.
192
+ test_files: []
Binary file