nronn 0.10.1.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +8 -0
  3. data/CHANGES +230 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +72 -0
  6. data/INSTALLING.md +92 -0
  7. data/LICENSE.txt +12 -0
  8. data/README.md +131 -0
  9. data/Rakefile +153 -0
  10. data/bin/ronn +253 -0
  11. data/completion/bash/ronn +32 -0
  12. data/completion/zsh/_ronn +24 -0
  13. data/config.ru +15 -0
  14. data/lib/ronn/document.rb +530 -0
  15. data/lib/ronn/index.rb +180 -0
  16. data/lib/ronn/roff.rb +393 -0
  17. data/lib/ronn/server.rb +67 -0
  18. data/lib/ronn/template/80c.css +6 -0
  19. data/lib/ronn/template/dark.css +18 -0
  20. data/lib/ronn/template/darktoc.css +17 -0
  21. data/lib/ronn/template/default.html +41 -0
  22. data/lib/ronn/template/man.css +100 -0
  23. data/lib/ronn/template/print.css +5 -0
  24. data/lib/ronn/template/screen.css +105 -0
  25. data/lib/ronn/template/toc.css +27 -0
  26. data/lib/ronn/template.rb +173 -0
  27. data/lib/ronn/utils.rb +57 -0
  28. data/lib/ronn.rb +47 -0
  29. data/man/index.html +78 -0
  30. data/man/index.txt +15 -0
  31. data/man/ronn-format.7 +145 -0
  32. data/man/ronn-format.7.ronn +157 -0
  33. data/man/ronn.1 +227 -0
  34. data/man/ronn.1.ronn +316 -0
  35. data/nronn.gemspec +136 -0
  36. data/test/angle_bracket_syntax.html +27 -0
  37. data/test/angle_bracket_syntax.roff +24 -0
  38. data/test/angle_bracket_syntax.ronn +22 -0
  39. data/test/backticks.html +14 -0
  40. data/test/backticks.ronn +10 -0
  41. data/test/basic_document.html +8 -0
  42. data/test/basic_document.ronn +4 -0
  43. data/test/circumflexes.ronn +1 -0
  44. data/test/code_blocks.html +38 -0
  45. data/test/code_blocks.roff +38 -0
  46. data/test/code_blocks.ronn +41 -0
  47. data/test/code_blocks_regression +19 -0
  48. data/test/code_blocks_regression.html +38 -0
  49. data/test/code_blocks_regression.ronn +40 -0
  50. data/test/contest.rb +70 -0
  51. data/test/custom_title_document.html +6 -0
  52. data/test/custom_title_document.ronn +5 -0
  53. data/test/definition_list_syntax.html +25 -0
  54. data/test/definition_list_syntax.roff +19 -0
  55. data/test/definition_list_syntax.ronn +18 -0
  56. data/test/dots_at_line_start_test.roff +19 -0
  57. data/test/dots_at_line_start_test.ronn +12 -0
  58. data/test/ellipses.roff +7 -0
  59. data/test/ellipses.ronn +7 -0
  60. data/test/entity_encoding_test.html +42 -0
  61. data/test/entity_encoding_test.roff +51 -0
  62. data/test/entity_encoding_test.ronn +34 -0
  63. data/test/index.txt +8 -0
  64. data/test/markdown_syntax.html +954 -0
  65. data/test/markdown_syntax.roff +907 -0
  66. data/test/markdown_syntax.ronn +881 -0
  67. data/test/middle_paragraph.html +14 -0
  68. data/test/middle_paragraph.roff +9 -0
  69. data/test/middle_paragraph.ronn +10 -0
  70. data/test/missing_spaces.roff +7 -0
  71. data/test/missing_spaces.ronn +2 -0
  72. data/test/nested_list.ronn +19 -0
  73. data/test/nested_list_with_code.html +14 -0
  74. data/test/nested_list_with_code.roff +11 -0
  75. data/test/nested_list_with_code.ronn +6 -0
  76. data/test/ordered_list.html +28 -0
  77. data/test/ordered_list.roff +25 -0
  78. data/test/ordered_list.ronn +21 -0
  79. data/test/page.with.periods.in.name.5.ronn +4 -0
  80. data/test/pre_block_with_quotes.roff +8 -0
  81. data/test/pre_block_with_quotes.ronn +6 -0
  82. data/test/section_reference_links.html +16 -0
  83. data/test/section_reference_links.roff +7 -0
  84. data/test/section_reference_links.ronn +12 -0
  85. data/test/single_quotes.html +11 -0
  86. data/test/single_quotes.roff +5 -0
  87. data/test/single_quotes.ronn +9 -0
  88. data/test/tables.ronn +24 -0
  89. data/test/test_ronn.rb +124 -0
  90. data/test/test_ronn_document.rb +186 -0
  91. data/test/test_ronn_index.rb +73 -0
  92. data/test/titleless_document.html +9 -0
  93. data/test/titleless_document.ronn +3 -0
  94. data/test/underline_spacing_test.roff +13 -0
  95. data/test/underline_spacing_test.ronn +11 -0
  96. metadata +309 -0
data/man/ronn.1.ronn ADDED
@@ -0,0 +1,316 @@
1
+ ronn(1) -- convert markdown files to manpages
2
+ =============================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `ronn` [<format>...] <file>...<br>
7
+ `ronn` `-m`|`--man` <file>...<br>
8
+ `ronn` `-S`|`--server` <file>...<br>
9
+ `ronn` `--pipe` <file><br>
10
+ `ronn` &lt; <file><br>
11
+ `ronn` `-E`|`--encoding` <encoding> ...
12
+
13
+ ## DESCRIPTION
14
+
15
+ **Ronn** converts textfiles to standard roff-formatted Unix manpages or HTML.
16
+ ronn-format(7) is based on markdown(7) but includes additional rules and syntax
17
+ geared toward authoring manuals.
18
+
19
+ In its default mode, `ronn` converts one or more input <file>s to HTML or roff
20
+ output files. The `--roff`, `--html`, and `--fragment` options dictate which
21
+ output files are generated. Multiple format arguments may be specified to
22
+ generate multiple output files. Output files are named after and written to the
23
+ same directory as input <file>s.
24
+
25
+ The `--server` and `--man` options change the output behavior from file
26
+ generation to serving dynamically generated HTML manpages or viewing <file> as
27
+ with man(1).
28
+
29
+ With no <file> arguments, `ronn` acts as simple filter. Ronn source text is read
30
+ from standard input and roff output is written to standard output. Use the
31
+ `--html`, `--roff`, and/or `--fragment` options to select the output format.
32
+
33
+ ## FILES
34
+
35
+ The `ronn` command expects input to be valid ronn-format(7) text. Source files
36
+ are typically named <name>.<section>.ronn (e.g., `example.1.ronn`). The <name>
37
+ and <section> should match the name and section defined in the <file>'s heading.
38
+
39
+ Source files must be in UTF-8 encoding, or the encoding specified by the
40
+ `-E`/`--encoding` option, regardless of the locale that `ronn` is running under.
41
+
42
+ When building roff or HTML output files, destination filenames are determined by
43
+ taking the basename of the input <file> and adding the appropriate file
44
+ extension (or removing the file extension in the case of roff output). For
45
+ example, executing `ronn example.1.ronn` generates `example.1` with roff output
46
+ and `example.1.html` with HTML output.
47
+
48
+ ## OPTIONS
49
+
50
+ These options control whether output is written to file(s), standard output, or
51
+ directly to a man pager.
52
+
53
+ * `-m`, `--man`:
54
+ Don't generate files, display <file>s as if man(1) were invoked on the roff
55
+ output file. This simulates default man behavior by piping the roff output
56
+ through groff(1) and the paging program specified by the `MANPAGER`
57
+ environment variable.
58
+
59
+ * `-S`, `--server`:
60
+ Don't generate files, start an HTTP server at <http://localhost:1207/> and
61
+ serve dynamically generated HTML for the set of input <file>s. A file named
62
+ *example.2.ronn* is served as */example.2.html*. There's also an index page
63
+ at the root with links to each <file>.
64
+
65
+ The server respects the `--style` and document attribute options
66
+ (`--manual`, `--date`, etc.). These same options can be varied at request
67
+ time by giving them as query parameters: `?manual=FOO&style=dark,toc`
68
+
69
+ *NOTE: The builtin server is designed to assist in the process of writing
70
+ and styling manuals. It is in no way recommended as a general purpose web
71
+ server.*
72
+
73
+ * `--port`=<port>
74
+ When used with `-S`/`--server`, runs the server at the specified port instead
75
+ of the default port 1207.
76
+
77
+ * `--pipe`:
78
+ Don't generate files, write generated output to standard output. This is the
79
+ default behavior when ronn source text is piped in on standard input and no
80
+ <file> arguments are provided.
81
+
82
+ * `-o`=<directory>, `--output-dir`=<directory>:
83
+ Write generated files to the specified directory instead of the default
84
+ location.
85
+
86
+ * `-E`=<encoding>, `--encoding`=<encoding:
87
+ Specify the encoding that input files are in. Default is UTF-8, regardless
88
+ of user's locale settings. Input sent to STDIN is always treated as UTF-8,
89
+ regardless of whether `-E` is passed.
90
+
91
+ Format options control the files `ronn` generates, or the output format when the
92
+ `--pipe` argument is specified. When no format options are given, both `--roff`
93
+ and `--html` are assumed.
94
+
95
+ * `-r`, `--roff`:
96
+ Generate roff output. This is the default behavior when no <file>s are given
97
+ and ronn source text is read from standard input.
98
+
99
+ * `-5`, `--html`:
100
+ Generate output in HTML format.
101
+
102
+ * `-f`, `--fragment`:
103
+ Generate output in HTML format but only the document fragment, not the
104
+ header, title, or footer.
105
+
106
+ Document attributes displayed in the header and footer areas of generated
107
+ content are specified with these options. (These values may also be set via
108
+ the [ENVIRONMENT][].)
109
+
110
+ * `--manual`=<manual>:
111
+ The name of the manual this man page belongs to; <manual> is prominently
112
+ displayed top-center in the header area.
113
+
114
+ * `--organization`=<name>:
115
+ The name of the group, organization, or individual responsible for
116
+ publishing the document; <name> is displayed in the bottom-left footer area.
117
+
118
+ * `--date`=<date>:
119
+ The document's published date; <date> must be formatted `YYYY-MM-DD` and is
120
+ displayed in the bottom-center footer area. The <file> mtime is used when no
121
+ <date> is given, or the current time when no <file> is available.
122
+
123
+ HTML output can be customized through the use of CSS stylesheets:
124
+
125
+ * `--style`=<module>[,<module>]...:
126
+ The list of CSS stylesheets to apply to the document. Multiple <module>
127
+ arguments may be specified, but must be separated by commas or spaces.
128
+
129
+ When <module> is a simple word, search for files named <module>`.css` in all
130
+ directories listed in the [`RONN_STYLE`](#ENVIRONMENT) environment variable,
131
+ and then search internal styles.
132
+
133
+ When <module> includes a _/_ character, use it as the full path to a
134
+ stylesheet file.
135
+
136
+ Internal styles are _man_ (included by default), _toc_, and _80c_. See
137
+ [STYLES][] for descriptions of features added by each module.
138
+
139
+ Miscellaneous options:
140
+
141
+ * `-w`, `--warnings`:
142
+ Show troff warnings on standard error when performing roff conversion.
143
+ Warnings are most often the result of a bug in ronn's HTML to roff conversion
144
+ logic.
145
+
146
+ * `-W`:
147
+ Disable troff warnings. Warnings are disabled by default. This option can be
148
+ used to revert the effect of a previous `-w` argument.
149
+
150
+ * `-v`, `--version`:
151
+ Show ronn version and exit.
152
+
153
+ ## LINK INDEXES
154
+
155
+ When generating HTML output, `ronn` hyperlinks manual references (like
156
+ `grep(1)`, `ls(1)`, `markdown(7)`) in source text based on reference name to URL
157
+ mappings defined in an `index.txt` file. Each line of the index file describes a
158
+ single reference link, with whitespace separating the reference's <id> from its
159
+ <location>. Blank lines are allowed; lines beginning with a `#` character are
160
+ ignored:
161
+
162
+ # manuals included in this project:
163
+ whisky(1) whisky.1.ronn
164
+ tango(5) tango.5.ronn
165
+
166
+ # external manuals
167
+ grep(1) http://man.cx/grep(1)
168
+ ls(1) http://man.cx/ls(1)
169
+
170
+ # other URLs for use with markdown reference links
171
+ src https://github.com/
172
+
173
+ The <location> is an absolute or relative URL that usually points at an HTML
174
+ version of manpage. It's possible to define references for things that aren't
175
+ manpages.
176
+
177
+ All manuals in an individual directory share the references defined in that
178
+ directory's `index.txt` file. Index references may be used explicitly in
179
+ Markdown reference style links using the syntax: `[`<text>`][`<id>`]`, where
180
+ <text> is the link text and <id> is a reference name defined in the index.
181
+
182
+ ## STYLES
183
+
184
+ The `--style` option selects a list of CSS stylesheets to include in the
185
+ generated HTML. Styles are applied in the order defined, so each can use the
186
+ cascade to override previously defined styles.
187
+
188
+ ### Builtin Stylesheets
189
+
190
+ These styles are included with the distribution:
191
+
192
+ * `man`:
193
+ Basic manpage styles: typography, definition lists, indentation. This is
194
+ always included regardless of `--style` argument. It is however possible to
195
+ replace the default `man` module with a custom one by placing a `man.css`
196
+ file on the `RONN_STYLE` path.
197
+
198
+ * `print`:
199
+ Basic print stylesheet. The generated `<style>` tag includes a
200
+ `media=print` attribute.
201
+
202
+ * `toc`:
203
+ Enables the Table of Contents navigation. The TOC markup is included in
204
+ generated HTML by default but hidden with an inline `display:none` style
205
+ rule; the `toc` module turns it on and applies basic TOC styles.
206
+
207
+ * `dark`:
208
+ Light text on a dark background.
209
+
210
+ * `80c`:
211
+ Changes the display width to mimic the display of a classic 80 character
212
+ terminal. The default display width causes lines to wrap at a gratuitous
213
+ 100 characters.
214
+
215
+ ### Custom Stylesheets
216
+
217
+ Writing custom stylesheets is straight-forward. The following core selectors
218
+ allow targeting all generated elements:
219
+
220
+ * `.mp`:
221
+ The manual page container element. Present on full documents and document
222
+ fragments.
223
+
224
+ * `body#manpage`:
225
+ Signifies that the page was fully-generated by Ronn and contains a single
226
+ manual page (`.mp` element).
227
+
228
+ * `.man-decor`:
229
+ The three-item heading and footing elements both have this class.
230
+
231
+ * `.man-head`, `.man-foot`:
232
+ The heading and footing, respectively.
233
+
234
+ * `.man-title`:
235
+ The main `<h1>` element. Hidden by default unless the manual has no <name>
236
+ or <section> attributes.
237
+
238
+ See the [builtin style sources][builtin] for examples.
239
+
240
+ [builtin]: https://github.com/n-ronn/nronn/tree/master/lib/ronn/template
241
+ "Builtin Stylesheet .css files"
242
+
243
+ ## EXAMPLES
244
+
245
+ Build roff and HTML output files and view the roff manpage using man(1):
246
+
247
+ $ ronn some-great-program.1.ronn
248
+ roff: some-great-program.1
249
+ html: some-great-program.1.html
250
+ $ man ./some-great-program.1
251
+
252
+ Build only the roff manpage for all `.ronn` files in the current directory:
253
+
254
+ $ ronn --roff *.ronn
255
+ roff: mv.1
256
+ roff: ls.1
257
+ roff: cd.1
258
+ roff: sh.1
259
+
260
+ Build only the HTML manpage for a few files and apply the `dark` and `toc`
261
+ stylesheets:
262
+
263
+ $ ronn --html --style=dark,toc mv.1.ronn ls.1.ronn
264
+ html: mv.1.html
265
+ html: ls.1.html
266
+
267
+ Generate roff output on standard output and write to file:
268
+
269
+ $ ronn <hello.1.ronn >hello.1
270
+
271
+ View a ronn file in the same way as man(1) without building a roff file:
272
+
273
+ $ ronn --man hello.1.ronn
274
+
275
+ Serve HTML manpages at <http://localhost:1207/> for all `*.ronn` files
276
+ under a `man/` directory:
277
+
278
+ $ ronn --server man/*.ronn
279
+ $ open http://localhost:1207/
280
+
281
+
282
+ ## ENVIRONMENT
283
+
284
+ * `RONN_MANUAL`:
285
+ A default manual name to be displayed in the top-center header area.
286
+ The `--manual` option takes precedence over this value.
287
+
288
+ * `RONN_ORGANIZATION`:
289
+ The default manual publishing group, organization, or individual to be
290
+ displayed in the bottom-left footer area. The `--organization` option takes
291
+ precedence over this value.
292
+
293
+ * `RONN_DATE`:
294
+ The default manual date in `YYYY-MM-DD` format. Displayed in the
295
+ bottom-center footer area. The `--date` option takes precedence over this
296
+ value.
297
+
298
+ * `RONN_STYLE`:
299
+ A `PATH`-style list of directories to check for stylesheets given to the
300
+ `--style` option. Directories are separated by a _:_; blank entries are
301
+ ignored. Use _._ to include the current working directory.
302
+
303
+ * `MANPAGER`:
304
+ The paging program used for man pages. This is typically set to
305
+ something like 'less -is'.
306
+
307
+ * `PAGER`:
308
+ Used instead of `MANPAGER` when `MANPAGER` is not defined.
309
+
310
+ ## COPYRIGHT
311
+
312
+ See [LICENSE.txt](./LICENSE.txt)
313
+
314
+ ## SEE ALSO
315
+
316
+ groff(1), man(1), pandoc(1), manpages(5), markdown(7), roff(7), ronn-format(7)
data/nronn.gemspec ADDED
@@ -0,0 +1,136 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'nronn'
3
+ s.version = '0.10.1.pre2'
4
+ s.date = '2022-08-01'
5
+ s.required_ruby_version = '>= 2.4'
6
+
7
+ s.summary = 'Builds man pages from Markdown'
8
+ s.description = 'nronn builds manuals in HTML and Unix man page format from Markdown.'
9
+ s.homepage = 'https://github.com/n-ronn/ronn'
10
+ s.license = 'MIT'
11
+
12
+ s.authors = ['Takuya Noguchi']
13
+ s.email = ['']
14
+
15
+ s.metadata = {
16
+ 'bug_tracker_uri' => 'https://github.com/n-ronn/nronn/issues',
17
+ 'source_code_uri' => 'https://github.com/n-ronn/nronn',
18
+ 'changelog_uri' => 'https://github.com/n-ronn/nronn/blob/master/CHANGES'
19
+ }
20
+
21
+ # = MANIFEST =
22
+ s.files = %w[
23
+ AUTHORS
24
+ CHANGES
25
+ Gemfile
26
+ Gemfile.lock
27
+ INSTALLING.md
28
+ LICENSE.txt
29
+ README.md
30
+ Rakefile
31
+ bin/ronn
32
+ completion/bash/ronn
33
+ completion/zsh/_ronn
34
+ config.ru
35
+ lib/ronn.rb
36
+ lib/ronn/document.rb
37
+ lib/ronn/index.rb
38
+ lib/ronn/roff.rb
39
+ lib/ronn/server.rb
40
+ lib/ronn/template.rb
41
+ lib/ronn/template/80c.css
42
+ lib/ronn/template/dark.css
43
+ lib/ronn/template/darktoc.css
44
+ lib/ronn/template/default.html
45
+ lib/ronn/template/man.css
46
+ lib/ronn/template/print.css
47
+ lib/ronn/template/screen.css
48
+ lib/ronn/template/toc.css
49
+ lib/ronn/utils.rb
50
+ man/index.html
51
+ man/index.txt
52
+ man/ronn-format.7
53
+ man/ronn-format.7.ronn
54
+ man/ronn.1
55
+ man/ronn.1.ronn
56
+ nronn.gemspec
57
+ test/angle_bracket_syntax.html
58
+ test/angle_bracket_syntax.roff
59
+ test/angle_bracket_syntax.ronn
60
+ test/backticks.html
61
+ test/backticks.ronn
62
+ test/basic_document.html
63
+ test/basic_document.ronn
64
+ test/circumflexes.ronn
65
+ test/code_blocks.html
66
+ test/code_blocks.roff
67
+ test/code_blocks.ronn
68
+ test/code_blocks_regression
69
+ test/code_blocks_regression.html
70
+ test/code_blocks_regression.ronn
71
+ test/contest.rb
72
+ test/custom_title_document.html
73
+ test/custom_title_document.ronn
74
+ test/definition_list_syntax.html
75
+ test/definition_list_syntax.roff
76
+ test/definition_list_syntax.ronn
77
+ test/dots_at_line_start_test.roff
78
+ test/dots_at_line_start_test.ronn
79
+ test/ellipses.roff
80
+ test/ellipses.ronn
81
+ test/entity_encoding_test.html
82
+ test/entity_encoding_test.roff
83
+ test/entity_encoding_test.ronn
84
+ test/index.txt
85
+ test/markdown_syntax.html
86
+ test/markdown_syntax.roff
87
+ test/markdown_syntax.ronn
88
+ test/middle_paragraph.html
89
+ test/middle_paragraph.roff
90
+ test/middle_paragraph.ronn
91
+ test/missing_spaces.roff
92
+ test/missing_spaces.ronn
93
+ test/nested_list.ronn
94
+ test/nested_list_with_code.html
95
+ test/nested_list_with_code.roff
96
+ test/nested_list_with_code.ronn
97
+ test/ordered_list.html
98
+ test/ordered_list.roff
99
+ test/ordered_list.ronn
100
+ test/page.with.periods.in.name.5.ronn
101
+ test/pre_block_with_quotes.roff
102
+ test/pre_block_with_quotes.ronn
103
+ test/section_reference_links.html
104
+ test/section_reference_links.roff
105
+ test/section_reference_links.ronn
106
+ test/single_quotes.html
107
+ test/single_quotes.roff
108
+ test/single_quotes.ronn
109
+ test/tables.ronn
110
+ test/test_ronn.rb
111
+ test/test_ronn_document.rb
112
+ test/test_ronn_index.rb
113
+ test/titleless_document.html
114
+ test/titleless_document.ronn
115
+ test/underline_spacing_test.roff
116
+ test/underline_spacing_test.ronn
117
+ ]
118
+ # = MANIFEST =
119
+
120
+ s.executables = ['ronn']
121
+ s.test_files = s.files.select { |path| path =~ /^test\/.*_test.rb/ }
122
+
123
+ s.extra_rdoc_files = %w[LICENSE.txt AUTHORS]
124
+ s.add_dependency 'kramdown', '~> 2.1'
125
+ s.add_dependency 'kramdown-parser-gfm', '~> 1.0.1'
126
+ s.add_dependency 'mustache', '~> 1.0'
127
+ s.add_dependency 'nokogiri', '~> 1.11', '>= 1.11.0'
128
+ s.add_development_dependency 'rack', '~> 2.2', '>= 2.2.3'
129
+ s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
130
+ s.add_development_dependency 'rubocop', '~> 0.88', '>= 0.88.0'
131
+ s.add_development_dependency 'sinatra', '~> 2.0', '>= 2.0.8'
132
+ s.add_development_dependency 'test-unit', '~> 3.3', '>= 3.3.6'
133
+
134
+ s.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'Ronn']
135
+ s.require_paths = %w[lib]
136
+ end
@@ -0,0 +1,27 @@
1
+ <div class='mp'>
2
+
3
+ <h2 id="NAME">NAME</h2>
4
+ <p class="man-name">
5
+ <code>angle_bracket_syntax</code> - <span class="man-whatis">angle bracket syntax test</span>
6
+ </p>
7
+ <p>A <var>WORD</var> in angle brackets is converted to <var>WORD</var>,</p>
8
+
9
+ <pre><code>except when &lt;WORD&gt; is
10
+ part of a preformatted
11
+ code block,
12
+ </code></pre>
13
+
14
+ <p>or when <code>&lt;WORD&gt;</code> is enclosed in backticks.</p>
15
+
16
+ <p>or when <var>WORD</var> has a <dot.> or <colon>.</colon></dot.></p>
17
+
18
+ <h2 id="Escaping-angle-brackets">Escaping angle brackets</h2>
19
+
20
+ <p>You can escape &lt;angle&gt; &lt;brackets&gt; with backslashes, since we're using GitHub Flavored Markdown.</p>
21
+
22
+ <p>Example:</p>
23
+
24
+ <p><code>pxzgrep</code> [<code>-p</code>&lt;n&gt;] [<code>-V</code>] [&lt;xzgrep options&gt;] &lt;pattern&gt; &lt;file1&gt; &lt;file2&gt; [&lt;more files&gt;]</p>
25
+
26
+ <p>(Though really you should just put that in a fenced code block.)</p>
27
+ </div>
@@ -0,0 +1,24 @@
1
+ .TH "ANGLE_BRACKET_SYNTAX" "5" "January 1979" ""
2
+ .SH "NAME"
3
+ \fBangle_bracket_syntax\fR \- angle bracket syntax test
4
+ .P
5
+ A \fIWORD\fR in angle brackets is converted to \fIWORD\fR,
6
+ .IP "" 4
7
+ .nf
8
+ except when <WORD> is
9
+ part of a preformatted
10
+ code block,
11
+ .fi
12
+ .IP "" 0
13
+ .P
14
+ or when \fB<WORD>\fR is enclosed in backticks\.
15
+ .P
16
+ or when \fIWORD\fR has a
17
+ .SH "Escaping angle brackets"
18
+ You can escape <angle> <brackets> with backslashes, since we're using GitHub Flavored Markdown\.
19
+ .P
20
+ Example:
21
+ .P
22
+ \fBpxzgrep\fR [\fB\-p\fR<n>] [\fB\-V\fR] [<xzgrep options>] <pattern> <file1> <file2> [<more files>]
23
+ .P
24
+ (Though really you should just put that in a fenced code block\.)
@@ -0,0 +1,22 @@
1
+ angle_bracket_syntax(5) -- angle bracket syntax test
2
+ ====================================================
3
+
4
+ A <WORD> in angle brackets is converted to <var>WORD</var>,
5
+
6
+ except when <WORD> is
7
+ part of a preformatted
8
+ code block,
9
+
10
+ or when `<WORD>` is enclosed in backticks.
11
+
12
+ or when <WORD> has a <dot.> or <foo:colon>.
13
+
14
+ ## Escaping angle brackets
15
+
16
+ You can escape \<angle\> \<brackets\> with backslashes, since we're using GitHub Flavored Markdown.
17
+
18
+ Example:
19
+
20
+ `pxzgrep` [`-p`\<n\>] [`-V`] [\<xzgrep options\>] \<pattern\> \<file1\> \<file2\> [\<more files\>]
21
+
22
+ (Though really you should just put that in a fenced code block.)
@@ -0,0 +1,14 @@
1
+ <div class='mp'>
2
+
3
+ <h2 id="NAME">NAME</h2>
4
+ <p class="man-name">
5
+ <code>backticks</code> - <span class="man-whatis">testing the link index with backticks</span>
6
+ </p>
7
+ <p><a class="man-ref" href="http://man.cx/grep(1)">grep<span class="s">(1)</span></a></p>
8
+
9
+ <p><a class="man-ref" href="http://man.cx/grep(1)"><code>grep</code><span class="s">(1)</span></a></p>
10
+
11
+ <p><span class="man-ref">man<span class="s">(1)</span></span></p>
12
+
13
+ <p><span class="man-ref"><code>man</code><span class="s">(1)</span></span></p>
14
+ </div>
@@ -0,0 +1,10 @@
1
+ backticks(7) -- testing the link index with backticks
2
+ =====================================================
3
+
4
+ grep(1)
5
+
6
+ `grep`(1)
7
+
8
+ man(1)
9
+
10
+ `man`(1)
@@ -0,0 +1,8 @@
1
+ <div class='mp'>
2
+
3
+ <h2 id="NAME">NAME</h2>
4
+ <p class="man-name">
5
+ <code>simple</code> - <span class="man-whatis">a simple ronn example</span>
6
+ </p>
7
+ <p>This document created by ronn.</p>
8
+ </div>
@@ -0,0 +1,4 @@
1
+ simple(7) -- a simple ronn example
2
+ =================================
3
+
4
+ This document created by ronn.
@@ -0,0 +1 @@
1
+ y = 2^x
@@ -0,0 +1,38 @@
1
+ <div class='mp'>
2
+
3
+ <h1 id="Example-Code-Blocks">Example Code Blocks</h1>
4
+ <h2 id="Basic-code-block">Basic code block</h2>
5
+
6
+ <pre><code>Hello, world!
7
+ </code></pre>
8
+
9
+ <h2 id="Language-identified-code-blocks">Language-identified code blocks</h2>
10
+
11
+ <pre><code class="language-html">&lt;html&gt;
12
+ &lt;head&gt;
13
+ &lt;title&gt;Hello, world!&lt;/title&gt;
14
+ &lt;/head&gt;
15
+ &lt;body&gt;
16
+ Hello, world!
17
+ &lt;/body&gt;
18
+ &lt;/html&gt;
19
+ </code></pre>
20
+
21
+ <h2 id="Interspersed-code-blocks-and-text">Interspersed code blocks and text</h2>
22
+
23
+ <p>Some text.</p>
24
+
25
+ <pre><code>Some code.
26
+ </code></pre>
27
+
28
+ <p>Here's some &lt;pre&gt; text.</p>
29
+
30
+ <pre>
31
+ This is pre text.
32
+ </pre>
33
+
34
+ <p>Some more text.</p>
35
+
36
+ <pre><code>Some more code.
37
+ </code></pre>
38
+ </div>
@@ -0,0 +1,38 @@
1
+ .TH "CODE_BLOCKS" "" "January 1979" ""
2
+ .SH "Basic code block"
3
+ .nf
4
+ Hello, world!
5
+ .fi
6
+ .SH "Language\-identified code blocks"
7
+ .nf
8
+ <html>
9
+ <head>
10
+ <title>Hello, world!</title>
11
+ </head>
12
+ <body>
13
+ Hello, world!
14
+ </body>
15
+ </html>
16
+ .fi
17
+ .SH "Interspersed code blocks and text"
18
+ Some text\.
19
+ .IP "" 4
20
+ .nf
21
+ Some code\.
22
+ .fi
23
+ .IP "" 0
24
+ .P
25
+ Here's some <pre> text\.
26
+ .IP "" 4
27
+ .nf
28
+ This is pre text\.
29
+ .fi
30
+ .IP "" 0
31
+ .P
32
+ Some more text\.
33
+ .IP "" 4
34
+ .nf
35
+ Some more code\.
36
+ .fi
37
+ .IP "" 0
38
+
@@ -0,0 +1,41 @@
1
+ Example Code Blocks
2
+ ===================
3
+
4
+ ## Basic code block
5
+
6
+ ```
7
+ Hello, world!
8
+ ```
9
+
10
+ ## Language-identified code blocks
11
+
12
+ ```html
13
+ <html>
14
+ <head>
15
+ <title>Hello, world!</title>
16
+ </head>
17
+ <body>
18
+ Hello, world!
19
+ </body>
20
+ </html>
21
+ ```
22
+
23
+ ## Interspersed code blocks and text
24
+
25
+ Some text.
26
+
27
+ ```
28
+ Some code.
29
+ ```
30
+
31
+ Here's some &lt;pre> text.
32
+
33
+ <pre>
34
+ This is pre text.
35
+ </pre>
36
+
37
+ Some more text.
38
+
39
+ ```
40
+ Some more code.
41
+ ```