ronn 0.7.0 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,6 +1,13 @@
1
1
  Ronn CHANGES
2
2
  ============
3
3
 
4
+ Version 0.7.3 (2010 June 24)
5
+ ----------------------------
6
+
7
+ * Fixed a major bug in roff output due to overly aggressive doublequote
8
+ escaping. Paragraphs and code blocks were not being displayed if they
9
+ included a double-quote character. (rtomayko, pawelz)
10
+
4
11
  Version 0.7.0 (2010 June 21)
5
12
  ----------------------------
6
13
 
@@ -45,6 +45,6 @@ module Ronn
45
45
  end
46
46
 
47
47
  # value generated by: rake rev
48
- REV = '0.7.0'
48
+ REV = '0.7.3'
49
49
  VERSION = version
50
50
  end
@@ -245,14 +245,14 @@ module Ronn
245
245
  text.gsub!(/&#x([0-9A-Fa-f]+);/) { $1.to_i(16).chr } # hex entities
246
246
  text.gsub!(/&#(\d+);/) { $1.to_i.chr } # dec entities
247
247
  text.gsub!('\\', '\e') # backslash
248
- text.gsub!(/['".-]/) { |m| "\\#{m}" } # control chars
248
+ text.gsub!(/['.-]/) { |m| "\\#{m}" } # control chars
249
249
  text.gsub!(/(&[A-Za-z]+;)/) { ent[$1] || $1 } # named entities
250
250
  text.gsub!('&', '&') # amps
251
251
  text
252
252
  end
253
253
 
254
254
  def quote(text)
255
- "\"#{text}\""
255
+ "\"#{text.gsub(/"/, '\\"')}\""
256
256
  end
257
257
 
258
258
  # write text to output buffer
@@ -1,13 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ronn'
3
- s.version = '0.7.0'
4
- s.date = '2010-06-21'
3
+ s.version = '0.7.3'
4
+ s.date = '2010-06-24'
5
5
 
6
- s.description = "The opposite of roff"
7
- s.summary = "The opposite of roff"
6
+ s.description = "Builds manuals"
7
+ s.summary = "Builds manuals"
8
+ s.homepage = "http://rtomayko.github.com/ronn"
8
9
 
9
- s.authors = ["Ryan Tomayko"]
10
- s.email = "rtomayko@gmail.com"
10
+ s.authors = ["Ryan Tomayko"]
11
+ s.email = "rtomayko@gmail.com"
11
12
 
12
13
  # = MANIFEST =
13
14
  s.files = %w[
@@ -65,6 +66,8 @@ Gem::Specification.new do |s|
65
66
  test/middle_paragraph.ronn
66
67
  test/missing_spaces.roff
67
68
  test/missing_spaces.ronn
69
+ test/pre_block_with_quotes.roff
70
+ test/pre_block_with_quotes.ronn
68
71
  test/section_reference_links.html
69
72
  test/section_reference_links.roff
70
73
  test/section_reference_links.ronn
@@ -87,7 +90,6 @@ Gem::Specification.new do |s|
87
90
  s.add_dependency 'mustache', '>= 0.7.0'
88
91
 
89
92
  s.has_rdoc = true
90
- s.homepage = "http://github.com/rtomayko/ronn/"
91
93
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ronn"]
92
94
  s.require_paths = %w[lib]
93
95
  s.rubygems_version = '1.1.1'
@@ -18,11 +18,11 @@ Paragraphs can be on one line (or many), and can drone on for
18
18
  hours\.
19
19
 
20
20
  [Reference style links][1] and [inline links](http://example\.com)
21
- [1]: http://example\.com \"Title is optional\"
21
+ [1]: http://example\.com "Title is optional"
22
22
 
23
23
  Inline markup like _italics_, **bold**, and `code()`\.
24
24
 
25
- ![picture alt](/images/photo\.jpeg \"Title is optional\")
25
+ ![picture alt](/images/photo\.jpeg "Title is optional")
26
26
 
27
27
  > Blockquotes are like quoted text in email replies
28
28
  >> And, they can be nested
@@ -201,19 +201,19 @@ However, inside Markdown code spans and blocks, angle brackets and ampersands ar
201
201
  A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines\. (A blank line is any line that looks like a blank line \-\- a line containing nothing but spaces or tabs is considered blank\.) Normal paragraphs should not be indented with spaces or tabs\.
202
202
  .
203
203
  .P
204
- The implication of the \"one or more consecutive lines of text\" rule is that Markdown supports \"hard\-wrapped\" text paragraphs\. This differs significantly from most other text\-to\-HTML formatters (including Movable Type\'s \"Convert Line Breaks\" option) which translate every line break character in a paragraph into a \fB<br />\fR tag\.
204
+ The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard\-wrapped" text paragraphs\. This differs significantly from most other text\-to\-HTML formatters (including Movable Type\'s "Convert Line Breaks" option) which translate every line break character in a paragraph into a \fB<br />\fR tag\.
205
205
  .
206
206
  .P
207
207
  When you \fIdo\fR want to insert a \fB<br />\fR break tag using Markdown, you end a line with two or more spaces, then type return\.
208
208
  .
209
209
  .P
210
- Yes, this takes a tad more effort to create a \fB<br />\fR, but a simplistic \"every line break is a \fB<br />\fR\" rule wouldn\'t work for Markdown\. Markdown\'s email\-style \fIblockquoting\fR and multi\-paragraph \fIlist items\fR work best \-\- and look better \-\- when you format them with hard breaks\.
210
+ Yes, this takes a tad more effort to create a \fB<br />\fR, but a simplistic "every line break is a \fB<br />\fR" rule wouldn\'t work for Markdown\. Markdown\'s email\-style \fIblockquoting\fR and multi\-paragraph \fIlist items\fR work best \-\- and look better \-\- when you format them with hard breaks\.
211
211
  .
212
212
  .SS "Headers"
213
213
  Markdown supports two styles of headers, Setext \fIhttp://docutils\.sourceforge\.net/mirror/setext\.html\fR and atx \fIhttp://www\.aaronsw\.com/2002/atx/\fR\.
214
214
  .
215
215
  .P
216
- Setext\-style headers are \"underlined\" using equal signs (for first\-level headers) and dashes (for second\-level headers)\. For example:
216
+ Setext\-style headers are "underlined" using equal signs (for first\-level headers) and dashes (for second\-level headers)\. For example:
217
217
  .
218
218
  .IP "" 4
219
219
  .
@@ -250,7 +250,7 @@ Atx\-style headers use 1\-6 hash characters at the start of the line, correspond
250
250
  .IP "" 0
251
251
  .
252
252
  .P
253
- Optionally, you may \"close\" atx\-style headers\. This is purely cosmetic \-\- you can use this if you think it looks better\. The closing hashes don\'t even need to match the number of hashes used to open the header\. (The number of opening hashes determines the header level\.) :
253
+ Optionally, you may "close" atx\-style headers\. This is purely cosmetic \-\- you can use this if you think it looks better\. The closing hashes don\'t even need to match the number of hashes used to open the header\. (The number of opening hashes determines the header level\.) :
254
254
  .
255
255
  .IP "" 4
256
256
  .
@@ -333,7 +333,7 @@ Blockquotes can contain other Markdown elements, including headers, lists, and c
333
333
  >
334
334
  > Here\'s some example code:
335
335
  >
336
- > return shell_exec(\"echo $input | $markdown_script\");
336
+ > return shell_exec("echo $input | $markdown_script");
337
337
  .
338
338
  .fi
339
339
  .
@@ -696,7 +696,7 @@ One level of indentation \-\- 4 spaces or 1 tab \-\- is removed from each line o
696
696
 
697
697
  Here is an example of AppleScript:
698
698
 
699
- tell application \"Foo\"
699
+ tell application "Foo"
700
700
  beep
701
701
  end tell
702
702
  .
@@ -713,7 +713,7 @@ will turn into:
713
713
 
714
714
  <p>Here is an example of AppleScript:</p>
715
715
 
716
- <pre><code>tell application \"Foo\"
716
+ <pre><code>tell application "Foo"
717
717
  beep
718
718
  end tell
719
719
  </code></pre>
@@ -732,7 +732,7 @@ Within a code block, ampersands (\fB&\fR) and angle brackets (\fB<\fR and \fB>\f
732
732
  .
733
733
  .nf
734
734
 
735
- <div class=\"footer\">
735
+ <div class="footer">
736
736
  &copy; 2004 Foo Corporation
737
737
  </div>
738
738
  .
@@ -747,7 +747,7 @@ will turn into:
747
747
  .
748
748
  .nf
749
749
 
750
- <pre><code>&lt;div class=\"footer\"&gt;
750
+ <pre><code>&lt;div class="footer"&gt;
751
751
  &amp;copy; 2004 Foo Corporation
752
752
  &lt;/div&gt;
753
753
  </code></pre>
@@ -795,7 +795,7 @@ To create an inline link, use a set of regular parentheses immediately after the
795
795
  .
796
796
  .nf
797
797
 
798
- This is [an example](http://example\.com/ \"Title\") inline link\.
798
+ This is [an example](http://example\.com/ "Title") inline link\.
799
799
 
800
800
  [This link](http://example\.net/) has no title attribute\.
801
801
  .
@@ -810,10 +810,10 @@ Will produce:
810
810
  .
811
811
  .nf
812
812
 
813
- <p>This is <a href=\"http://example\.com/\" title=\"Title\">
813
+ <p>This is <a href="http://example\.com/" title="Title">
814
814
  an example</a> inline link\.</p>
815
815
 
816
- <p><a href=\"http://example\.net/\">This link</a> has no
816
+ <p><a href="http://example\.net/">This link</a> has no
817
817
  title attribute\.</p>
818
818
  .
819
819
  .fi
@@ -866,7 +866,7 @@ Then, anywhere in the document, you define your link label like this, on a line
866
866
  .
867
867
  .nf
868
868
 
869
- [id]: http://example\.com/ \"Optional Title Here\"
869
+ [id]: http://example\.com/ "Optional Title Here"
870
870
  .
871
871
  .fi
872
872
  .
@@ -899,7 +899,7 @@ The following three link definitions are equivalent:
899
899
  .
900
900
  .nf
901
901
 
902
- [foo]: http://example\.com/ \"Optional Title Here\"
902
+ [foo]: http://example\.com/ "Optional Title Here"
903
903
  [foo]: http://example\.com/ \'Optional Title Here\'
904
904
  [foo]: http://example\.com/ (Optional Title Here)
905
905
  .
@@ -917,7 +917,7 @@ The link URL may, optionally, be surrounded by angle brackets:
917
917
  .
918
918
  .nf
919
919
 
920
- [id]: <http://example\.com/> \"Optional Title Here\"
920
+ [id]: <http://example\.com/> "Optional Title Here"
921
921
  .
922
922
  .fi
923
923
  .
@@ -931,7 +931,7 @@ You can put the title attribute on the next line and use extra spaces or tabs fo
931
931
  .nf
932
932
 
933
933
  [id]: http://example\.com/longish/path/to/resource/here
934
- \"Optional Title Here\"
934
+ "Optional Title Here"
935
935
  .
936
936
  .fi
937
937
  .
@@ -958,7 +958,7 @@ Link definition names may consist of letters, numbers, spaces, and punctuation \
958
958
  are equivalent\.
959
959
  .
960
960
  .P
961
- The \fIimplicit link name\fR shortcut allows you to omit the name of the link, in which case the link text itself is used as the name\. Just use an empty set of square brackets \-\- e\.g\., to link the word \"Google\" to the google\.com web site, you could simply write:
961
+ The \fIimplicit link name\fR shortcut allows you to omit the name of the link, in which case the link text itself is used as the name\. Just use an empty set of square brackets \-\- e\.g\., to link the word "Google" to the google\.com web site, you could simply write:
962
962
  .
963
963
  .IP "" 4
964
964
  .
@@ -1022,9 +1022,9 @@ Here\'s an example of reference links in action:
1022
1022
  I get 10 times more traffic from [Google] [1] than from
1023
1023
  [Yahoo] [2] or [MSN] [3]\.
1024
1024
 
1025
- [1]: http://google\.com/ \"Google\"
1026
- [2]: http://search\.yahoo\.com/ \"Yahoo Search\"
1027
- [3]: http://search\.msn\.com/ \"MSN Search\"
1025
+ [1]: http://google\.com/ "Google"
1026
+ [2]: http://search\.yahoo\.com/ "Yahoo Search"
1027
+ [3]: http://search\.msn\.com/ "MSN Search"
1028
1028
  .
1029
1029
  .fi
1030
1030
  .
@@ -1040,9 +1040,9 @@ Using the implicit link name shortcut, you could instead write:
1040
1040
  I get 10 times more traffic from [Google][] than from
1041
1041
  [Yahoo][] or [MSN][]\.
1042
1042
 
1043
- [google]: http://google\.com/ \"Google\"
1044
- [yahoo]: http://search\.yahoo\.com/ \"Yahoo Search\"
1045
- [msn]: http://search\.msn\.com/ \"MSN Search\"
1043
+ [google]: http://google\.com/ "Google"
1044
+ [yahoo]: http://search\.yahoo\.com/ "Yahoo Search"
1045
+ [msn]: http://search\.msn\.com/ "MSN Search"
1046
1046
  .
1047
1047
  .fi
1048
1048
  .
@@ -1055,10 +1055,10 @@ Both of the above examples will produce the following HTML output:
1055
1055
  .
1056
1056
  .nf
1057
1057
 
1058
- <p>I get 10 times more traffic from <a href=\"http://google\.com/\"
1059
- title=\"Google\">Google</a> than from
1060
- <a href=\"http://search\.yahoo\.com/\" title=\"Yahoo Search\">Yahoo</a>
1061
- or <a href=\"http://search\.msn\.com/\" title=\"MSN Search\">MSN</a>\.</p>
1058
+ <p>I get 10 times more traffic from <a href="http://google\.com/"
1059
+ title="Google">Google</a> than from
1060
+ <a href="http://search\.yahoo\.com/" title="Yahoo Search">Yahoo</a>
1061
+ or <a href="http://search\.msn\.com/" title="MSN Search">MSN</a>\.</p>
1062
1062
  .
1063
1063
  .fi
1064
1064
  .
@@ -1071,9 +1071,9 @@ For comparison, here is the same paragraph written using Markdown\'s inline link
1071
1071
  .
1072
1072
  .nf
1073
1073
 
1074
- I get 10 times more traffic from [Google](http://google\.com/ \"Google\")
1075
- than from [Yahoo](http://search\.yahoo\.com/ \"Yahoo Search\") or
1076
- [MSN](http://search\.msn\.com/ \"MSN Search\")\.
1074
+ I get 10 times more traffic from [Google](http://google\.com/ "Google")
1075
+ than from [Yahoo](http://search\.yahoo\.com/ "Yahoo Search") or
1076
+ [MSN](http://search\.msn\.com/ "MSN Search")\.
1077
1077
  .
1078
1078
  .fi
1079
1079
  .
@@ -1291,7 +1291,7 @@ equivalent of <code>&amp;mdash;</code>\.</p>
1291
1291
  .IP "" 0
1292
1292
  .
1293
1293
  .SS "Images"
1294
- Admittedly, it\'s fairly difficult to devise a \"natural\" syntax for placing images into a plain text document format\.
1294
+ Admittedly, it\'s fairly difficult to devise a "natural" syntax for placing images into a plain text document format\.
1295
1295
  .
1296
1296
  .P
1297
1297
  Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: \fIinline\fR and \fIreference\fR\.
@@ -1305,7 +1305,7 @@ Inline image syntax looks like this:
1305
1305
 
1306
1306
  ![Alt text](/path/to/img\.jpg)
1307
1307
 
1308
- ![Alt text](/path/to/img\.jpg \"Optional title\")
1308
+ ![Alt text](/path/to/img\.jpg "Optional title")
1309
1309
  .
1310
1310
  .fi
1311
1311
  .
@@ -1339,13 +1339,13 @@ Reference\-style image syntax looks like this:
1339
1339
  .IP "" 0
1340
1340
  .
1341
1341
  .P
1342
- Where \"id\" is the name of a defined image reference\. Image references are defined using syntax identical to link references:
1342
+ Where "id" is the name of a defined image reference\. Image references are defined using syntax identical to link references:
1343
1343
  .
1344
1344
  .IP "" 4
1345
1345
  .
1346
1346
  .nf
1347
1347
 
1348
- [id]: url/to/image \"Optional title attribute\"
1348
+ [id]: url/to/image "Optional title attribute"
1349
1349
  .
1350
1350
  .fi
1351
1351
  .
@@ -1357,7 +1357,7 @@ As of this writing, Markdown has no syntax for specifying the dimensions of an i
1357
1357
  .SH "MISCELLANEOUS"
1358
1358
  .
1359
1359
  .SS "Automatic Links"
1360
- Markdown supports a shortcut style for creating \"automatic\" links for URLs and email addresses: simply surround the URL or email address with angle brackets\. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:
1360
+ Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets\. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:
1361
1361
  .
1362
1362
  .IP "" 4
1363
1363
  .
@@ -1376,7 +1376,7 @@ Markdown will turn this into:
1376
1376
  .
1377
1377
  .nf
1378
1378
 
1379
- <a href=\"http://example\.com/\">http://example\.com/</a>
1379
+ <a href="http://example\.com/">http://example\.com/</a>
1380
1380
  .
1381
1381
  .fi
1382
1382
  .
@@ -1402,9 +1402,9 @@ into something like this:
1402
1402
  .
1403
1403
  .nf
1404
1404
 
1405
- <a href=\"&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
1405
+ <a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
1406
1406
  &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
1407
- &#109;\">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
1407
+ &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
1408
1408
  &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
1409
1409
  .
1410
1410
  .fi
@@ -1412,7 +1412,7 @@ into something like this:
1412
1412
  .IP "" 0
1413
1413
  .
1414
1414
  .P
1415
- which will render in a browser as a clickable link to \"address@example\.com\"\.
1415
+ which will render in a browser as a clickable link to "address@example\.com"\.
1416
1416
  .
1417
1417
  .P
1418
1418
  (This sort of entity\-encoding trick will indeed fool many, if not most, address\-harvesting bots, but it definitely won\'t fool all of them\. It\'s better than nothing, but an address published in this way will probably eventually start receiving spam\.)
@@ -0,0 +1,13 @@
1
+ .TH "T" "1" "January 1979" "" ""
2
+ .
3
+ .SH "NAME"
4
+ \fBt\fR \- test
5
+ .
6
+ .SH "test"
7
+ .
8
+ .nf
9
+
10
+ [ "$11" ]
11
+ .
12
+ .fi
13
+
@@ -0,0 +1,6 @@
1
+ t(1) - test
2
+ ===========
3
+
4
+ ## test
5
+
6
+ [ "$11" ]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 0
10
- version: 0.7.0
9
+ - 3
10
+ version: 0.7.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Tomayko
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-21 00:00:00 -07:00
18
+ date: 2010-06-24 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: 0.7.0
67
67
  type: :runtime
68
68
  version_requirements: *id003
69
- description: The opposite of roff
69
+ description: Builds manuals
70
70
  email: rtomayko@gmail.com
71
71
  executables:
72
72
  - ronn
@@ -130,6 +130,8 @@ files:
130
130
  - test/middle_paragraph.ronn
131
131
  - test/missing_spaces.roff
132
132
  - test/missing_spaces.ronn
133
+ - test/pre_block_with_quotes.roff
134
+ - test/pre_block_with_quotes.ronn
133
135
  - test/section_reference_links.html
134
136
  - test/section_reference_links.roff
135
137
  - test/section_reference_links.ronn
@@ -141,7 +143,7 @@ files:
141
143
  - test/underline_spacing_test.roff
142
144
  - test/underline_spacing_test.ronn
143
145
  has_rdoc: true
144
- homepage: http://github.com/rtomayko/ronn/
146
+ homepage: http://rtomayko.github.com/ronn
145
147
  licenses: []
146
148
 
147
149
  post_install_message:
@@ -176,6 +178,6 @@ rubyforge_project:
176
178
  rubygems_version: 1.3.7
177
179
  signing_key:
178
180
  specification_version: 3
179
- summary: The opposite of roff
181
+ summary: Builds manuals
180
182
  test_files: []
181
183