nronn 0.10.1.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/AUTHORS +8 -0
- data/CHANGES +230 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +72 -0
- data/INSTALLING.md +92 -0
- data/LICENSE.txt +12 -0
- data/README.md +131 -0
- data/Rakefile +153 -0
- data/bin/ronn +253 -0
- data/completion/bash/ronn +32 -0
- data/completion/zsh/_ronn +24 -0
- data/config.ru +15 -0
- data/lib/ronn/document.rb +530 -0
- data/lib/ronn/index.rb +180 -0
- data/lib/ronn/roff.rb +393 -0
- data/lib/ronn/server.rb +67 -0
- data/lib/ronn/template/80c.css +6 -0
- data/lib/ronn/template/dark.css +18 -0
- data/lib/ronn/template/darktoc.css +17 -0
- data/lib/ronn/template/default.html +41 -0
- data/lib/ronn/template/man.css +100 -0
- data/lib/ronn/template/print.css +5 -0
- data/lib/ronn/template/screen.css +105 -0
- data/lib/ronn/template/toc.css +27 -0
- data/lib/ronn/template.rb +173 -0
- data/lib/ronn/utils.rb +57 -0
- data/lib/ronn.rb +47 -0
- data/man/index.html +78 -0
- data/man/index.txt +15 -0
- data/man/ronn-format.7 +145 -0
- data/man/ronn-format.7.ronn +157 -0
- data/man/ronn.1 +227 -0
- data/man/ronn.1.ronn +316 -0
- data/nronn.gemspec +136 -0
- data/test/angle_bracket_syntax.html +27 -0
- data/test/angle_bracket_syntax.roff +24 -0
- data/test/angle_bracket_syntax.ronn +22 -0
- data/test/backticks.html +14 -0
- data/test/backticks.ronn +10 -0
- data/test/basic_document.html +8 -0
- data/test/basic_document.ronn +4 -0
- data/test/circumflexes.ronn +1 -0
- data/test/code_blocks.html +38 -0
- data/test/code_blocks.roff +38 -0
- data/test/code_blocks.ronn +41 -0
- data/test/code_blocks_regression +19 -0
- data/test/code_blocks_regression.html +38 -0
- data/test/code_blocks_regression.ronn +40 -0
- data/test/contest.rb +70 -0
- data/test/custom_title_document.html +6 -0
- data/test/custom_title_document.ronn +5 -0
- data/test/definition_list_syntax.html +25 -0
- data/test/definition_list_syntax.roff +19 -0
- data/test/definition_list_syntax.ronn +18 -0
- data/test/dots_at_line_start_test.roff +19 -0
- data/test/dots_at_line_start_test.ronn +12 -0
- data/test/ellipses.roff +7 -0
- data/test/ellipses.ronn +7 -0
- data/test/entity_encoding_test.html +42 -0
- data/test/entity_encoding_test.roff +51 -0
- data/test/entity_encoding_test.ronn +34 -0
- data/test/index.txt +8 -0
- data/test/markdown_syntax.html +954 -0
- data/test/markdown_syntax.roff +907 -0
- data/test/markdown_syntax.ronn +881 -0
- data/test/middle_paragraph.html +14 -0
- data/test/middle_paragraph.roff +9 -0
- data/test/middle_paragraph.ronn +10 -0
- data/test/missing_spaces.roff +7 -0
- data/test/missing_spaces.ronn +2 -0
- data/test/nested_list.ronn +19 -0
- data/test/nested_list_with_code.html +14 -0
- data/test/nested_list_with_code.roff +11 -0
- data/test/nested_list_with_code.ronn +6 -0
- data/test/ordered_list.html +28 -0
- data/test/ordered_list.roff +25 -0
- data/test/ordered_list.ronn +21 -0
- data/test/page.with.periods.in.name.5.ronn +4 -0
- data/test/pre_block_with_quotes.roff +8 -0
- data/test/pre_block_with_quotes.ronn +6 -0
- data/test/section_reference_links.html +16 -0
- data/test/section_reference_links.roff +7 -0
- data/test/section_reference_links.ronn +12 -0
- data/test/single_quotes.html +11 -0
- data/test/single_quotes.roff +5 -0
- data/test/single_quotes.ronn +9 -0
- data/test/tables.ronn +24 -0
- data/test/test_ronn.rb +124 -0
- data/test/test_ronn_document.rb +186 -0
- data/test/test_ronn_index.rb +73 -0
- data/test/titleless_document.html +9 -0
- data/test/titleless_document.ronn +3 -0
- data/test/underline_spacing_test.roff +13 -0
- data/test/underline_spacing_test.ronn +11 -0
- metadata +309 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'contest'
|
2
|
+
require 'ronn'
|
3
|
+
|
4
|
+
class IndexTest < Test::Unit::TestCase
|
5
|
+
setup do
|
6
|
+
@index_path = File.expand_path('index.txt', __dir__)
|
7
|
+
@missing_path = File.expand_path('missing-index.txt', __dir__)
|
8
|
+
end
|
9
|
+
|
10
|
+
def expand_path(path, rel = File.dirname(__FILE__))
|
11
|
+
File.expand_path(path, rel)
|
12
|
+
end
|
13
|
+
|
14
|
+
test 'creating with a non-existent file' do
|
15
|
+
index = Ronn::Index.new(@missing_path)
|
16
|
+
assert_equal @missing_path, index.path
|
17
|
+
assert_equal 0, index.size
|
18
|
+
assert index.empty?
|
19
|
+
end
|
20
|
+
|
21
|
+
test 'creating with an index file and no block' do
|
22
|
+
index = Ronn::Index.new(@index_path)
|
23
|
+
assert_equal 3, index.size
|
24
|
+
assert_equal 2, index.manuals.size
|
25
|
+
|
26
|
+
ref = index.references[0]
|
27
|
+
assert_equal 'basic_document(7)', ref.name
|
28
|
+
assert_equal 'basic_document.ronn', ref.location
|
29
|
+
assert_equal 'basic_document.html', ref.url
|
30
|
+
assert_equal expand_path('basic_document.ronn'), ref.path
|
31
|
+
assert ref.manual?
|
32
|
+
assert ref.ronn?
|
33
|
+
assert !ref.remote?
|
34
|
+
|
35
|
+
ref = index.references[1]
|
36
|
+
assert_equal 'definition_list_syntax(5)', ref.name
|
37
|
+
assert_equal 'definition_list_syntax.ronn', ref.location
|
38
|
+
assert_equal 'definition_list_syntax.html', ref.url
|
39
|
+
assert_equal expand_path('definition_list_syntax.ronn'), ref.path
|
40
|
+
|
41
|
+
ref = index.references[2]
|
42
|
+
assert_equal 'grep(1)', ref.name
|
43
|
+
assert_equal 'http://man.cx/grep(1)', ref.url
|
44
|
+
assert ref.manual?
|
45
|
+
assert ref.remote?
|
46
|
+
assert !ref.ronn?
|
47
|
+
end
|
48
|
+
|
49
|
+
test 'creating with a block reader' do
|
50
|
+
index = Ronn::Index.new(@index_path) { 'hello(1) hello.1.ronn' }
|
51
|
+
assert_equal @index_path, index.path
|
52
|
+
assert_equal 1, index.size
|
53
|
+
ref = index.first
|
54
|
+
assert_equal 'hello(1)', ref.name
|
55
|
+
assert_equal 'hello.1.ronn', ref.location
|
56
|
+
assert_equal 'hello.1.html', ref.url
|
57
|
+
assert_equal expand_path('hello.1.ronn'), ref.path
|
58
|
+
end
|
59
|
+
|
60
|
+
test 'adding manual paths' do
|
61
|
+
index = Ronn::Index.new(@index_path)
|
62
|
+
index << expand_path('angle_bracket_syntax.ronn')
|
63
|
+
assert_equal 'angle_bracket_syntax(5)', index.last.name
|
64
|
+
assert_equal expand_path('angle_bracket_syntax.ronn'), index.last.path
|
65
|
+
end
|
66
|
+
|
67
|
+
test 'adding manual paths that are already present' do
|
68
|
+
index = Ronn::Index.new(@index_path)
|
69
|
+
size = index.size
|
70
|
+
index << expand_path('basic_document.ronn')
|
71
|
+
assert_equal size, index.size
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<div class='mp'>
|
2
|
+
<h2 id="NAME">NAME</h2>
|
3
|
+
<p class="man-name">
|
4
|
+
<code>titleless_document</code>
|
5
|
+
</p>
|
6
|
+
<p>This is a document without a level 1 heading. It generates
|
7
|
+
a <code>NAME</code> section from the filename but does not include an
|
8
|
+
<code><h1></code> element.</p>
|
9
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
.TH "UNDERLINE_SPACING_TEST" "" "January 1979" ""
|
2
|
+
.SH "NAME"
|
3
|
+
\fBunderline_spacing_test\fR
|
4
|
+
.P
|
5
|
+
This input
|
6
|
+
.TP
|
7
|
+
\fB\-S\fR \fItext\fR, \fBsearch\fR \fItext\fR
|
8
|
+
Performs a substring search of formula names for \fItext\fR\.
|
9
|
+
.TP
|
10
|
+
\fB\-O\fR \fItext\fR, \fBother\fR \fItext\fR
|
11
|
+
Does something else\.
|
12
|
+
.P
|
13
|
+
Should space text properly\.
|
metadata
ADDED
@@ -0,0 +1,309 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nronn
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.1.pre2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Takuya Noguchi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-08-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: kramdown
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: kramdown-parser-gfm
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mustache
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nokogiri
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.11'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.11.0
|
65
|
+
type: :runtime
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '1.11'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.11.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rack
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '2.2'
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 2.2.3
|
85
|
+
type: :development
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '2.2'
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 2.2.3
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: rake
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '12.3'
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 12.3.3
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '12.3'
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 12.3.3
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: rubocop
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - "~>"
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0.88'
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.88.0
|
125
|
+
type: :development
|
126
|
+
prerelease: false
|
127
|
+
version_requirements: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.88'
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 0.88.0
|
135
|
+
- !ruby/object:Gem::Dependency
|
136
|
+
name: sinatra
|
137
|
+
requirement: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - "~>"
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '2.0'
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 2.0.8
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '2.0'
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 2.0.8
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: test-unit
|
157
|
+
requirement: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - "~>"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '3.3'
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: 3.3.6
|
165
|
+
type: :development
|
166
|
+
prerelease: false
|
167
|
+
version_requirements: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - "~>"
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '3.3'
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: 3.3.6
|
175
|
+
description: nronn builds manuals in HTML and Unix man page format from Markdown.
|
176
|
+
email:
|
177
|
+
- ''
|
178
|
+
executables:
|
179
|
+
- ronn
|
180
|
+
extensions: []
|
181
|
+
extra_rdoc_files:
|
182
|
+
- LICENSE.txt
|
183
|
+
- AUTHORS
|
184
|
+
files:
|
185
|
+
- AUTHORS
|
186
|
+
- CHANGES
|
187
|
+
- Gemfile
|
188
|
+
- Gemfile.lock
|
189
|
+
- INSTALLING.md
|
190
|
+
- LICENSE.txt
|
191
|
+
- README.md
|
192
|
+
- Rakefile
|
193
|
+
- bin/ronn
|
194
|
+
- completion/bash/ronn
|
195
|
+
- completion/zsh/_ronn
|
196
|
+
- config.ru
|
197
|
+
- lib/ronn.rb
|
198
|
+
- lib/ronn/document.rb
|
199
|
+
- lib/ronn/index.rb
|
200
|
+
- lib/ronn/roff.rb
|
201
|
+
- lib/ronn/server.rb
|
202
|
+
- lib/ronn/template.rb
|
203
|
+
- lib/ronn/template/80c.css
|
204
|
+
- lib/ronn/template/dark.css
|
205
|
+
- lib/ronn/template/darktoc.css
|
206
|
+
- lib/ronn/template/default.html
|
207
|
+
- lib/ronn/template/man.css
|
208
|
+
- lib/ronn/template/print.css
|
209
|
+
- lib/ronn/template/screen.css
|
210
|
+
- lib/ronn/template/toc.css
|
211
|
+
- lib/ronn/utils.rb
|
212
|
+
- man/index.html
|
213
|
+
- man/index.txt
|
214
|
+
- man/ronn-format.7
|
215
|
+
- man/ronn-format.7.ronn
|
216
|
+
- man/ronn.1
|
217
|
+
- man/ronn.1.ronn
|
218
|
+
- nronn.gemspec
|
219
|
+
- test/angle_bracket_syntax.html
|
220
|
+
- test/angle_bracket_syntax.roff
|
221
|
+
- test/angle_bracket_syntax.ronn
|
222
|
+
- test/backticks.html
|
223
|
+
- test/backticks.ronn
|
224
|
+
- test/basic_document.html
|
225
|
+
- test/basic_document.ronn
|
226
|
+
- test/circumflexes.ronn
|
227
|
+
- test/code_blocks.html
|
228
|
+
- test/code_blocks.roff
|
229
|
+
- test/code_blocks.ronn
|
230
|
+
- test/code_blocks_regression
|
231
|
+
- test/code_blocks_regression.html
|
232
|
+
- test/code_blocks_regression.ronn
|
233
|
+
- test/contest.rb
|
234
|
+
- test/custom_title_document.html
|
235
|
+
- test/custom_title_document.ronn
|
236
|
+
- test/definition_list_syntax.html
|
237
|
+
- test/definition_list_syntax.roff
|
238
|
+
- test/definition_list_syntax.ronn
|
239
|
+
- test/dots_at_line_start_test.roff
|
240
|
+
- test/dots_at_line_start_test.ronn
|
241
|
+
- test/ellipses.roff
|
242
|
+
- test/ellipses.ronn
|
243
|
+
- test/entity_encoding_test.html
|
244
|
+
- test/entity_encoding_test.roff
|
245
|
+
- test/entity_encoding_test.ronn
|
246
|
+
- test/index.txt
|
247
|
+
- test/markdown_syntax.html
|
248
|
+
- test/markdown_syntax.roff
|
249
|
+
- test/markdown_syntax.ronn
|
250
|
+
- test/middle_paragraph.html
|
251
|
+
- test/middle_paragraph.roff
|
252
|
+
- test/middle_paragraph.ronn
|
253
|
+
- test/missing_spaces.roff
|
254
|
+
- test/missing_spaces.ronn
|
255
|
+
- test/nested_list.ronn
|
256
|
+
- test/nested_list_with_code.html
|
257
|
+
- test/nested_list_with_code.roff
|
258
|
+
- test/nested_list_with_code.ronn
|
259
|
+
- test/ordered_list.html
|
260
|
+
- test/ordered_list.roff
|
261
|
+
- test/ordered_list.ronn
|
262
|
+
- test/page.with.periods.in.name.5.ronn
|
263
|
+
- test/pre_block_with_quotes.roff
|
264
|
+
- test/pre_block_with_quotes.ronn
|
265
|
+
- test/section_reference_links.html
|
266
|
+
- test/section_reference_links.roff
|
267
|
+
- test/section_reference_links.ronn
|
268
|
+
- test/single_quotes.html
|
269
|
+
- test/single_quotes.roff
|
270
|
+
- test/single_quotes.ronn
|
271
|
+
- test/tables.ronn
|
272
|
+
- test/test_ronn.rb
|
273
|
+
- test/test_ronn_document.rb
|
274
|
+
- test/test_ronn_index.rb
|
275
|
+
- test/titleless_document.html
|
276
|
+
- test/titleless_document.ronn
|
277
|
+
- test/underline_spacing_test.roff
|
278
|
+
- test/underline_spacing_test.ronn
|
279
|
+
homepage: https://github.com/n-ronn/ronn
|
280
|
+
licenses:
|
281
|
+
- MIT
|
282
|
+
metadata:
|
283
|
+
bug_tracker_uri: https://github.com/n-ronn/nronn/issues
|
284
|
+
source_code_uri: https://github.com/n-ronn/nronn
|
285
|
+
changelog_uri: https://github.com/n-ronn/nronn/blob/master/CHANGES
|
286
|
+
post_install_message:
|
287
|
+
rdoc_options:
|
288
|
+
- "--line-numbers"
|
289
|
+
- "--inline-source"
|
290
|
+
- "--title"
|
291
|
+
- Ronn
|
292
|
+
require_paths:
|
293
|
+
- lib
|
294
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
295
|
+
requirements:
|
296
|
+
- - ">="
|
297
|
+
- !ruby/object:Gem::Version
|
298
|
+
version: '2.4'
|
299
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
|
+
requirements:
|
301
|
+
- - ">"
|
302
|
+
- !ruby/object:Gem::Version
|
303
|
+
version: 1.3.1
|
304
|
+
requirements: []
|
305
|
+
rubygems_version: 3.3.19
|
306
|
+
signing_key:
|
307
|
+
specification_version: 4
|
308
|
+
summary: Builds man pages from Markdown
|
309
|
+
test_files: []
|