nronn 0.10.1.pre3 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHORS +1 -0
  3. data/CHANGES +8 -14
  4. data/README.md +14 -10
  5. data/Rakefile +1 -1
  6. data/lib/ronn/template/default.html +1 -1
  7. data/lib/ronn.rb +4 -6
  8. data/man/index.html +8 -8
  9. data/man/ronn-format.7 +3 -3
  10. data/man/ronn.1 +4 -4
  11. data/man/ronn.1.ronn +1 -1
  12. data/nronn.gemspec +5 -68
  13. metadata +13 -78
  14. data/Gemfile +0 -2
  15. data/Gemfile.lock +0 -72
  16. data/test/angle_bracket_syntax.html +0 -27
  17. data/test/angle_bracket_syntax.roff +0 -24
  18. data/test/angle_bracket_syntax.ronn +0 -22
  19. data/test/backticks.html +0 -14
  20. data/test/backticks.ronn +0 -10
  21. data/test/basic_document.html +0 -8
  22. data/test/basic_document.ronn +0 -4
  23. data/test/circumflexes.ronn +0 -1
  24. data/test/code_blocks.html +0 -38
  25. data/test/code_blocks.roff +0 -38
  26. data/test/code_blocks.ronn +0 -41
  27. data/test/code_blocks_regression +0 -19
  28. data/test/code_blocks_regression.html +0 -38
  29. data/test/code_blocks_regression.ronn +0 -40
  30. data/test/contest.rb +0 -70
  31. data/test/custom_title_document.html +0 -6
  32. data/test/custom_title_document.ronn +0 -5
  33. data/test/definition_list_syntax.html +0 -25
  34. data/test/definition_list_syntax.roff +0 -19
  35. data/test/definition_list_syntax.ronn +0 -18
  36. data/test/dots_at_line_start_test.roff +0 -19
  37. data/test/dots_at_line_start_test.ronn +0 -12
  38. data/test/ellipses.roff +0 -7
  39. data/test/ellipses.ronn +0 -7
  40. data/test/entity_encoding_test.html +0 -42
  41. data/test/entity_encoding_test.roff +0 -51
  42. data/test/entity_encoding_test.ronn +0 -34
  43. data/test/index.txt +0 -8
  44. data/test/markdown_syntax.html +0 -954
  45. data/test/markdown_syntax.roff +0 -907
  46. data/test/markdown_syntax.ronn +0 -881
  47. data/test/middle_paragraph.html +0 -14
  48. data/test/middle_paragraph.roff +0 -9
  49. data/test/middle_paragraph.ronn +0 -10
  50. data/test/missing_spaces.roff +0 -7
  51. data/test/missing_spaces.ronn +0 -2
  52. data/test/nested_list.ronn +0 -19
  53. data/test/nested_list_with_code.html +0 -14
  54. data/test/nested_list_with_code.roff +0 -11
  55. data/test/nested_list_with_code.ronn +0 -6
  56. data/test/ordered_list.html +0 -28
  57. data/test/ordered_list.roff +0 -25
  58. data/test/ordered_list.ronn +0 -21
  59. data/test/page.with.periods.in.name.5.ronn +0 -4
  60. data/test/pre_block_with_quotes.roff +0 -8
  61. data/test/pre_block_with_quotes.ronn +0 -6
  62. data/test/section_reference_links.html +0 -16
  63. data/test/section_reference_links.roff +0 -7
  64. data/test/section_reference_links.ronn +0 -12
  65. data/test/single_quotes.html +0 -11
  66. data/test/single_quotes.roff +0 -5
  67. data/test/single_quotes.ronn +0 -9
  68. data/test/tables.ronn +0 -24
  69. data/test/test_ronn.rb +0 -124
  70. data/test/test_ronn_document.rb +0 -186
  71. data/test/test_ronn_index.rb +0 -73
  72. data/test/titleless_document.html +0 -9
  73. data/test/titleless_document.ronn +0 -3
  74. data/test/underline_spacing_test.roff +0 -13
  75. data/test/underline_spacing_test.ronn +0 -11
data/test/backticks.html DELETED
@@ -1,14 +0,0 @@
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>
data/test/backticks.ronn DELETED
@@ -1,10 +0,0 @@
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)
@@ -1,8 +0,0 @@
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>
@@ -1,4 +0,0 @@
1
- simple(7) -- a simple ronn example
2
- =================================
3
-
4
- This document created by ronn.
@@ -1 +0,0 @@
1
- y = 2^x
@@ -1,38 +0,0 @@
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>
@@ -1,38 +0,0 @@
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
-
@@ -1,41 +0,0 @@
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
- ```
@@ -1,19 +0,0 @@
1
- .\" generated with nRonn/v0.9.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.9.1
3
- .TH "CODE_BLOCKS_REGRESSION" "" "July 2020" ""
4
- .SH "In the text:"
5
- This is Renzo\'s code\.
6
- .P
7
- Debian\'s lintian returns the following warning: acute\-accent\-in\-manual\-page
8
- .P
9
- This manual page uses the \' groff sequence\. Usually, the intent to generate an apostrophe, but that sequence actually renders as a an acute accent\.
10
- .P
11
- For an apostrophe or a single closing quote, use plain \'\. For single opening quote, i\.e\. a straight downward line \' like the one used in shell commands, use \e(aq\.
12
- .SH "Basic code block"
13
- The situation is even worse when there are code blocks, mainly code chunks or commands\. E\.g\., copy\-paste fails\.
14
- .P
15
- Type the following command \fBecho \'Hello World\'\fR\.
16
- .P
17
- \fBbash $ echo \'hello world\'\fR
18
- .P
19
- The following code cannot be compiled: \fBC int main() { int example = 42; switch (example) { case \'a\': return 10; default: return 42; } }\fR
@@ -1,38 +0,0 @@
1
- <div class='mp'>
2
-
3
- <h1 id="Example-Quote-Error">Example Quote Error</h1>
4
- <h2 id="In-the-text-">In the text:</h2>
5
-
6
- <p>This is Renzo's code.</p>
7
-
8
- <p>Debian's lintian returns the following warning:
9
- acute-accent-in-manual-page</p>
10
-
11
- <p>This manual page uses the ' groff sequence. Usually, the intent to
12
- generate an apostrophe, but that sequence actually renders as a an acute
13
- accent.</p>
14
-
15
- <p>For an apostrophe or a single closing quote, use plain '. For single
16
- opening quote, i.e. a straight downward line ' like the one used in
17
- shell commands, use \(aq.</p>
18
-
19
- <h2 id="Basic-code-block">Basic code block</h2>
20
-
21
- <p>The situation is even worse when there are code blocks, mainly code
22
- chunks or commands. E.g., copy-paste fails.</p>
23
-
24
- <p>Type the following command <code>echo 'Hello World'</code>.</p>
25
-
26
- <pre><code class="language-bash">$ echo 'hello world'
27
- </code></pre>
28
-
29
- <p>The following code cannot be compiled:</p>
30
- <pre><code class="language-C">int main() {
31
- int example = 42;
32
- switch (example) {
33
- case 'a': return 10;
34
- default: return 42;
35
- }
36
- }
37
- </code></pre>
38
- </div>
@@ -1,40 +0,0 @@
1
- Example Quote Error
2
- ===================
3
-
4
- ## In the text:
5
-
6
- This is Renzo's code.
7
-
8
- Debian's lintian returns the following warning:
9
- acute-accent-in-manual-page
10
-
11
- This manual page uses the \' groff sequence. Usually, the intent to
12
- generate an apostrophe, but that sequence actually renders as a an acute
13
- accent.
14
-
15
- For an apostrophe or a single closing quote, use plain '. For single
16
- opening quote, i.e. a straight downward line ' like the one used in
17
- shell commands, use &#92;(aq.
18
-
19
- ## Basic code block
20
-
21
- The situation is even worse when there are code blocks, mainly code
22
- chunks or commands. E.g., copy-paste fails.
23
-
24
- Type the following command `echo 'Hello World'`.
25
-
26
- ``` bash
27
- $ echo 'hello world'
28
- ```
29
-
30
- The following code cannot be compiled:
31
- ``` C
32
- int main() {
33
- int example = 42;
34
- switch (example) {
35
- case 'a': return 10;
36
- default: return 42;
37
- }
38
- }
39
- ```
40
-
data/test/contest.rb DELETED
@@ -1,70 +0,0 @@
1
- require 'test/unit'
2
-
3
- module Test
4
- module Unit
5
- # TestSuite loads a default test if the suite is empty, whose purpose is to
6
- # fail. Since having empty contexts is a common practice, we decided to
7
- # overwrite TestSuite#empty? in order to allow them. Having a failure when no
8
- # tests have been defined seems counter-intuitive.
9
- class TestSuite
10
- def empty?
11
- false
12
- end
13
- end
14
-
15
- # Contest adds +teardown+, +test+ and +context+ as class methods, and the
16
- # instance methods +setup+ and +teardown+ now iterate on the corresponding
17
- # blocks. Note that all setup and teardown blocks must be defined with the
18
- # block syntax. Adding setup or teardown instance methods defeats the purpose
19
- # of this library.
20
- class TestCase
21
- def self.setup(&block)
22
- define_method :setup do
23
- super(&block)
24
- instance_eval(&block)
25
- end
26
- end
27
-
28
- def self.teardown(&block)
29
- define_method :teardown do
30
- instance_eval(&block)
31
- super(&block)
32
- end
33
- end
34
-
35
- def self.context(name, &block)
36
- subclass = Class.new(self)
37
- remove_tests(subclass)
38
- subclass.class_eval(&block) if block_given?
39
- const_set(context_name(name), subclass)
40
- end
41
-
42
- def self.test(name, &block)
43
- define_method(test_name(name), &block)
44
- end
45
-
46
- class << self
47
- alias should test
48
- alias describe context
49
- end
50
-
51
- def self.context_name(name)
52
- "Test#{sanitize_name(name).gsub(/(^| )(\w)/) { $2.upcase }}".to_sym
53
- end
54
-
55
- def self.test_name(name)
56
- "test_#{sanitize_name(name).gsub(/\s+/, '_')}".to_sym
57
- end
58
-
59
- def self.sanitize_name(name)
60
- name.gsub(/\W+/, ' ').strip
61
- end
62
-
63
- def self.remove_tests(subclass)
64
- subclass.public_instance_methods.grep(/^test_/).each do |meth|
65
- subclass.send(:undef_method, meth.to_sym)
66
- end
67
- end
68
- end
69
- end
70
- end
@@ -1,6 +0,0 @@
1
- <div class='mp'>
2
-
3
- <h1 id="This-is-a-custom-title">This is a custom title</h1>
4
- <p>It doesn't define the name or section of this manual page and is
5
- output as a simple <code>&lt;h1&gt;</code> instead of a <code>NAME</code> section.</p>
6
- </div>
@@ -1,5 +0,0 @@
1
- This is a custom title
2
- ======================
3
-
4
- It doesn't define the name or section of this manual page and is
5
- output as a simple `<h1>` instead of a `NAME` section.
@@ -1,25 +0,0 @@
1
- <div class='mp'>
2
-
3
- <h2 id="NAME">NAME</h2>
4
- <p class="man-name">
5
- <code>definition_list_syntax</code> - <span class="man-whatis">hiya</span>
6
- </p>
7
- <p>Definition lists look like unordered lists:</p>
8
-
9
- <dl>
10
- <dt>term</dt>
11
- <dd>definition</dd>
12
- <dt>another one</dt>
13
- <dd>The definition may span
14
- multiple lines and even
15
-
16
- <p>start</p>
17
-
18
- <p>new paragraphs</p>
19
- </dd>
20
- <dt>
21
- <code>--somearg</code>=<var>VALUE</var>
22
- </dt>
23
- <dd>We can do that too.</dd>
24
- </dl>
25
- </div>
@@ -1,19 +0,0 @@
1
- .TH "DEFINITION_LIST_SYNTAX" "5" "January 1979" ""
2
- .SH "NAME"
3
- \fBdefinition_list_syntax\fR \- hiya
4
- .P
5
- Definition lists look like unordered lists:
6
- .TP
7
- term
8
- definition
9
- .TP
10
- another one
11
- The definition may span multiple lines and even
12
- .IP
13
- start
14
- .IP
15
- new paragraphs
16
- .TP
17
- \fB\-\-somearg\fR=\fIVALUE\fR
18
- We can do that too\.
19
-
@@ -1,18 +0,0 @@
1
- definition_list_syntax(5) -- hiya
2
- =================================
3
-
4
- Definition lists look like unordered lists:
5
-
6
- * term:
7
- definition
8
-
9
- * another one:
10
- The definition may span
11
- multiple lines and even
12
-
13
- start
14
-
15
- new paragraphs
16
-
17
- * `--somearg`=<VALUE>:
18
- We can do that too.
@@ -1,19 +0,0 @@
1
- .TH "DOTS_AT_LINE_START_TEST" "" "January 1979" ""
2
- .SH "NAME"
3
- \fBdots_at_line_start_test\fR
4
- .P
5
- There's a weird issue where dots at the beginning of a line generate troff warnings due to escaping\.
6
- .P
7
- \&\.\. let's see what happens\.
8
- .IP "" 4
9
- .nf
10
- \&\. A dot on an indented line
11
-
12
- \&\. Another dot on an indented line
13
-
14
- some text
15
- some more text
16
- \&\. A dot on an indented line as part of a paragraph
17
- .fi
18
- .IP "" 0
19
-
@@ -1,12 +0,0 @@
1
- There's a weird issue where dots at the beginning of a line
2
- generate troff warnings due to escaping.
3
-
4
- .. let's see what happens.
5
-
6
- . A dot on an indented line
7
-
8
- . Another dot on an indented line
9
-
10
- some text
11
- some more text
12
- . A dot on an indented line as part of a paragraph
data/test/ellipses.roff DELETED
@@ -1,7 +0,0 @@
1
- .TH "ELLIPSES" "7" "January 1979" ""
2
- .SH "NAME"
3
- \fBellipses\fR \- testing ellipses
4
- .P
5
- Ellipses should be replaced\|\.\|\.\|\.
6
- .P
7
- \|\.\|\.\|\.also, they shouldn't interfere with regular dots at the beginning of a line\.
data/test/ellipses.ronn DELETED
@@ -1,7 +0,0 @@
1
- ellipses(7) -- testing ellipses
2
- ===============================
3
-
4
- Ellipses should be replaced...
5
-
6
- ...also, they shouldn't interfere with regular dots at the beginning
7
- of a line.
@@ -1,42 +0,0 @@
1
- <div class='mp'>
2
-
3
- <h2 id="NAME">NAME</h2>
4
- <p class="man-name">
5
- <code>hello</code> - <span class="man-whatis">hello world</span>
6
- </p>
7
- <p>Your output &lt;i&gt;might&lt;/i&gt; look like this:</p>
8
-
9
- <pre><code>* Chris
10
- *
11
- * &amp;lt;b&amp;gt;GitHub&amp;lt;/b&amp;gt;
12
- * &lt;b&gt;GitHub&lt;/b&gt;
13
- </code></pre>
14
-
15
- <p>Here's some special entities:</p>
16
-
17
- <ul>
18
- <li>&amp;bull; •</li>
19
- <li>&amp;nbsp;  </li>
20
- <li>&amp;copy; ©</li>
21
- <li>&amp;rdquo; ”</li>
22
- <li>&amp;mdash; —</li>
23
- <li>&amp;reg; ®</li>
24
- <li>&amp;sect; §</li>
25
- <li>&amp;ge; ≥</li>
26
- <li>&amp;le; ≤</li>
27
- <li>&amp;ne; ≠</li>
28
- <li>&amp;equiv; ≡</li>
29
- </ul>
30
-
31
- <p>Here's a line that uses non-breaking spaces to force the
32
- last few words to wrap together.</p>
33
-
34
- <p>And stuff like this:</p>
35
-
36
- <p>git bulk [-g] ([-a]|[-w <ws-name>]) <git command> </git></ws-name><br>
37
- git bulk --addworkspace <ws-name> <ws-root-directory> (--from <url or file>) </url></ws-root-directory></ws-name><br>
38
- git bulk --removeworkspace &lt;ws-name&gt; <br></p>
39
-
40
- <p>Should have the <code>&amp;lt;</code>/<code>&amp;gt;</code> entities stay as <code>&amp;lt;</code>/<code>&amp;gt;</code> in HTML, but be
41
- turned into literal brackets in the ROFF.</p>
42
- </div>
@@ -1,51 +0,0 @@
1
- .TH "HELLO" "1" "January 1979" ""
2
- .SH "NAME"
3
- \fBhello\fR \- hello world
4
- .P
5
- Your output <i>might</i> look like this:
6
- .IP "" 4
7
- .nf
8
- * Chris
9
- *
10
- * &lt;b&gt;GitHub&lt;/b&gt;
11
- * <b>GitHub</b>
12
- .fi
13
- .IP "" 0
14
- .P
15
- Here's some special entities:
16
- .IP "\(bu" 4
17
- &bull; \(bu
18
- .IP "\(bu" 4
19
- &nbsp; \~
20
- .IP "\(bu" 4
21
- &copy; \(co
22
- .IP "\(bu" 4
23
- &rdquo; \(rs
24
- .IP "\(bu" 4
25
- &mdash; \(em
26
- .IP "\(bu" 4
27
- &reg; \(rg
28
- .IP "\(bu" 4
29
- &sect; \(sc
30
- .IP "\(bu" 4
31
- &ge; \(>=
32
- .IP "\(bu" 4
33
- &le; \(<=
34
- .IP "\(bu" 4
35
- &ne; \(!=
36
- .IP "\(bu" 4
37
- &equiv; \(==
38
- .IP "" 0
39
- .P
40
- Here's a line that uses non\-breaking spaces to force the last\~few\~words\~to\~wrap\~together\.
41
- .P
42
- And stuff like this:
43
- .P
44
- git bulk [\-g] ([\-a]|[\-w
45
- .br
46
- git bulk \-\-addworkspace
47
- .br
48
- git bulk \-\-removeworkspace <ws\-name>
49
- .br
50
- .P
51
- Should have the \fB&lt;\fR/\fB&gt;\fR entities stay as \fB&lt;\fR/\fB&gt;\fR in HTML, but be turned into literal brackets in the ROFF\.
@@ -1,34 +0,0 @@
1
- # hello(1) -- hello world
2
-
3
- Your output &lt;i&gt;might&lt;/i&gt; look like this:
4
-
5
- * Chris
6
- *
7
- * &lt;b&gt;GitHub&lt;/b&gt;
8
- * <b>GitHub</b>
9
-
10
- Here's some special entities:
11
-
12
- * &amp;bull; &bull;
13
- * &amp;nbsp; &nbsp;
14
- * &amp;copy; &copy;
15
- * &amp;rdquo; &rdquo;
16
- * &amp;mdash; &mdash;
17
- * &amp;reg; &reg;
18
- * &amp;sect; &sect;
19
- * &amp;ge; &ge;
20
- * &amp;le; &le;
21
- * &amp;ne; &ne;
22
- * &amp;equiv; &equiv;
23
-
24
- Here's a line that uses non-breaking spaces to force the
25
- last&nbsp;few&nbsp;words&nbsp;to&nbsp;wrap&nbsp;together.
26
-
27
- And stuff like this:
28
-
29
- git bulk [-g] ([-a]|[-w &lt;ws-name&gt;]) &lt;git command&gt; <br/>
30
- git bulk --addworkspace &lt;ws-name&gt; &lt;ws-root-directory&gt; (--from &lt;URL or file&gt;) <br/>
31
- git bulk --removeworkspace &lt;ws-name&gt; <br/>
32
-
33
- Should have the `&lt;`/`&gt;` entities stay as `&lt;`/`&gt;` in HTML, but be
34
- turned into literal brackets in the ROFF.
data/test/index.txt DELETED
@@ -1,8 +0,0 @@
1
- # test ronn index
2
-
3
- # local manuals
4
- basic_document(7) basic_document.ronn
5
- definition_list_syntax(5) definition_list_syntax.ronn
6
-
7
- # see also
8
- grep(1) http://man.cx/grep(1)