bluecloth 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/ChangeLog +629 -0
  2. data/LICENSE +27 -0
  3. data/LICENSE.discount +47 -0
  4. data/README +71 -0
  5. data/Rakefile +319 -0
  6. data/Rakefile.local +63 -0
  7. data/bin/bluecloth +84 -0
  8. data/ext/VERSION +1 -0
  9. data/ext/amalloc.h +29 -0
  10. data/ext/bluecloth.c +373 -0
  11. data/ext/config.h +47 -0
  12. data/ext/cstring.h +73 -0
  13. data/ext/docheader.c +43 -0
  14. data/ext/extconf.rb +45 -0
  15. data/ext/generate.c +1387 -0
  16. data/ext/markdown.c +939 -0
  17. data/ext/markdown.h +135 -0
  18. data/ext/mkdio.c +241 -0
  19. data/ext/mkdio.h +66 -0
  20. data/ext/resource.c +169 -0
  21. data/ext/version.c +28 -0
  22. data/lib/bluecloth.rb +148 -0
  23. data/rake/191_compat.rb +26 -0
  24. data/rake/dependencies.rb +76 -0
  25. data/rake/helpers.rb +412 -0
  26. data/rake/manual.rb +782 -0
  27. data/rake/packaging.rb +116 -0
  28. data/rake/publishing.rb +321 -0
  29. data/rake/rdoc.rb +40 -0
  30. data/rake/style.rb +62 -0
  31. data/rake/svn.rb +639 -0
  32. data/rake/testing.rb +204 -0
  33. data/rake/verifytask.rb +64 -0
  34. data/rake/win32.rb +186 -0
  35. data/spec/bluecloth/101_changes_spec.rb +141 -0
  36. data/spec/bluecloth/autolinks_spec.rb +49 -0
  37. data/spec/bluecloth/blockquotes_spec.rb +143 -0
  38. data/spec/bluecloth/code_spans_spec.rb +164 -0
  39. data/spec/bluecloth/emphasis_spec.rb +164 -0
  40. data/spec/bluecloth/entities_spec.rb +65 -0
  41. data/spec/bluecloth/hrules_spec.rb +90 -0
  42. data/spec/bluecloth/images_spec.rb +92 -0
  43. data/spec/bluecloth/inline_html_spec.rb +238 -0
  44. data/spec/bluecloth/links_spec.rb +171 -0
  45. data/spec/bluecloth/lists_spec.rb +294 -0
  46. data/spec/bluecloth/paragraphs_spec.rb +75 -0
  47. data/spec/bluecloth/titles_spec.rb +305 -0
  48. data/spec/bluecloth_spec.rb +209 -0
  49. data/spec/bugfix_spec.rb +123 -0
  50. data/spec/contributions_spec.rb +85 -0
  51. data/spec/data/antsugar.txt +34 -0
  52. data/spec/data/markdowntest/Amps and angle encoding.html +17 -0
  53. data/spec/data/markdowntest/Amps and angle encoding.text +21 -0
  54. data/spec/data/markdowntest/Auto links.html +18 -0
  55. data/spec/data/markdowntest/Auto links.text +13 -0
  56. data/spec/data/markdowntest/Backslash escapes.html +118 -0
  57. data/spec/data/markdowntest/Backslash escapes.text +120 -0
  58. data/spec/data/markdowntest/Blockquotes with code blocks.html +15 -0
  59. data/spec/data/markdowntest/Blockquotes with code blocks.text +11 -0
  60. data/spec/data/markdowntest/Code Blocks.html +18 -0
  61. data/spec/data/markdowntest/Code Blocks.text +14 -0
  62. data/spec/data/markdowntest/Code Spans.html +5 -0
  63. data/spec/data/markdowntest/Code Spans.text +5 -0
  64. data/spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.html +8 -0
  65. data/spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.text +8 -0
  66. data/spec/data/markdowntest/Horizontal rules.html +71 -0
  67. data/spec/data/markdowntest/Horizontal rules.text +67 -0
  68. data/spec/data/markdowntest/Inline HTML (Advanced).html +15 -0
  69. data/spec/data/markdowntest/Inline HTML (Advanced).text +15 -0
  70. data/spec/data/markdowntest/Inline HTML (Simple).html +72 -0
  71. data/spec/data/markdowntest/Inline HTML (Simple).text +69 -0
  72. data/spec/data/markdowntest/Inline HTML comments.html +13 -0
  73. data/spec/data/markdowntest/Inline HTML comments.text +13 -0
  74. data/spec/data/markdowntest/Links, inline style.html +11 -0
  75. data/spec/data/markdowntest/Links, inline style.text +12 -0
  76. data/spec/data/markdowntest/Links, reference style.html +52 -0
  77. data/spec/data/markdowntest/Links, reference style.text +71 -0
  78. data/spec/data/markdowntest/Links, shortcut references.html +9 -0
  79. data/spec/data/markdowntest/Links, shortcut references.text +20 -0
  80. data/spec/data/markdowntest/Literal quotes in titles.html +3 -0
  81. data/spec/data/markdowntest/Literal quotes in titles.text +7 -0
  82. data/spec/data/markdowntest/Markdown Documentation - Basics.html +314 -0
  83. data/spec/data/markdowntest/Markdown Documentation - Basics.text +306 -0
  84. data/spec/data/markdowntest/Markdown Documentation - Syntax.html +942 -0
  85. data/spec/data/markdowntest/Markdown Documentation - Syntax.text +888 -0
  86. data/spec/data/markdowntest/Nested blockquotes.html +9 -0
  87. data/spec/data/markdowntest/Nested blockquotes.text +5 -0
  88. data/spec/data/markdowntest/Ordered and unordered lists.html +148 -0
  89. data/spec/data/markdowntest/Ordered and unordered lists.text +131 -0
  90. data/spec/data/markdowntest/Strong and em together.html +7 -0
  91. data/spec/data/markdowntest/Strong and em together.text +7 -0
  92. data/spec/data/markdowntest/Tabs.html +25 -0
  93. data/spec/data/markdowntest/Tabs.text +21 -0
  94. data/spec/data/markdowntest/Tidyness.html +8 -0
  95. data/spec/data/markdowntest/Tidyness.text +5 -0
  96. data/spec/data/ml-announce.txt +17 -0
  97. data/spec/data/re-overflow.txt +67 -0
  98. data/spec/data/re-overflow2.txt +281 -0
  99. data/spec/lib/constants.rb +5 -0
  100. data/spec/lib/helpers.rb +137 -0
  101. data/spec/lib/matchers.rb +235 -0
  102. data/spec/markdowntest_spec.rb +76 -0
  103. metadata +305 -0
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ BEGIN {
4
+ require 'pathname'
5
+ basedir = Pathname.new( __FILE__ ).dirname.parent
6
+
7
+ libdir = basedir + 'lib'
8
+ extdir = basedir + 'ext'
9
+
10
+ $LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
11
+ $LOAD_PATH.unshift( extdir ) unless $LOAD_PATH.include?( extdir )
12
+ }
13
+
14
+ require 'spec'
15
+ require 'bluecloth'
16
+
17
+ require 'spec/lib/helpers'
18
+ require 'spec/lib/constants'
19
+ require 'spec/lib/matchers'
20
+
21
+ require 'rbconfig'
22
+ require 'dl'
23
+
24
+
25
+ #####################################################################
26
+ ### C O N T E X T S
27
+ #####################################################################
28
+
29
+ describe BlueCloth, "-- MarkdownTest 1.0.3: " do
30
+ include BlueCloth::TestConstants,
31
+ BlueCloth::Matchers
32
+
33
+ before( :all ) do
34
+ soext = Config::CONFIG['LIBRUBY_ALIASES'].sub( /.*\./, '' )
35
+ @dlname = "libtidy.#{soext}"
36
+
37
+ begin
38
+ DL.dlopen( @dlname )
39
+ rescue RuntimeError => err
40
+ @have_libtidy = false
41
+ @tidy_error = err.message
42
+ else
43
+ @have_libtidy = true
44
+ @tidy_error = nil
45
+ end
46
+
47
+ begin
48
+ require 'tidy'
49
+ rescue LoadError, NameError => err
50
+ @have_libtidy = false
51
+ @tidy_error = err.message
52
+ end
53
+
54
+ end
55
+
56
+ before( :each ) do
57
+ pending( "These tests require the tidy library: #@tidy_error" ) unless @have_libtidy
58
+ end
59
+
60
+
61
+ markdowntest_dir = Pathname.new( __FILE__ ).dirname + 'data/markdowntest'
62
+ pattern = markdowntest_dir + '*.text'
63
+ Pathname.glob( pattern.to_s ).each do |textfile|
64
+ resultfile = Pathname.new( textfile.to_s.sub(/\.text/, '.html') )
65
+
66
+ it textfile.basename( '.text' ) do
67
+ markdown = textfile.read
68
+ expected = resultfile.read
69
+ options = { :smartypants => false }
70
+
71
+ the_markdown( markdown, options ).should be_transformed_into_normalized_html( expected )
72
+ end
73
+ end
74
+
75
+ end
76
+
metadata ADDED
@@ -0,0 +1,305 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bluecloth
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Michael Granger
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-04-07 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: text-format
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.0.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: termios
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: rubyforge
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: rspec
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 0.8.1
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: libxml-ruby
67
+ type: :development
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 0.8.3
74
+ version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: ultraviolet
77
+ type: :development
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 0.10.2
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: tmail
87
+ type: :development
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 1.2.3.1
94
+ version:
95
+ - !ruby/object:Gem::Dependency
96
+ name: amatch
97
+ type: :development
98
+ version_requirement:
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 0.2.3
104
+ version:
105
+ - !ruby/object:Gem::Dependency
106
+ name: rcov
107
+ type: :development
108
+ version_requirement:
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: "0"
114
+ version:
115
+ - !ruby/object:Gem::Dependency
116
+ name: RedCloth
117
+ type: :development
118
+ version_requirement:
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 4.0.3
124
+ version:
125
+ - !ruby/object:Gem::Dependency
126
+ name: rcodetools
127
+ type: :development
128
+ version_requirement:
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: 0.7.0.0
134
+ version:
135
+ description: "BlueCloth is a Ruby implementation of [Markdown][1], a text-to-HTML conversion tool for web writers. To quote from the project page: Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)."
136
+ email: ged@FaerieMUD.org
137
+ executables:
138
+ - bluecloth
139
+ extensions:
140
+ - ext/extconf.rb
141
+ extra_rdoc_files:
142
+ - ChangeLog
143
+ - README
144
+ - LICENSE
145
+ - LICENSE.discount
146
+ files:
147
+ - Rakefile
148
+ - ChangeLog
149
+ - README
150
+ - LICENSE
151
+ - spec/bluecloth/101_changes_spec.rb
152
+ - spec/bluecloth/autolinks_spec.rb
153
+ - spec/bluecloth/blockquotes_spec.rb
154
+ - spec/bluecloth/code_spans_spec.rb
155
+ - spec/bluecloth/emphasis_spec.rb
156
+ - spec/bluecloth/entities_spec.rb
157
+ - spec/bluecloth/hrules_spec.rb
158
+ - spec/bluecloth/images_spec.rb
159
+ - spec/bluecloth/inline_html_spec.rb
160
+ - spec/bluecloth/links_spec.rb
161
+ - spec/bluecloth/lists_spec.rb
162
+ - spec/bluecloth/paragraphs_spec.rb
163
+ - spec/bluecloth/titles_spec.rb
164
+ - spec/bluecloth_spec.rb
165
+ - spec/bugfix_spec.rb
166
+ - spec/contributions_spec.rb
167
+ - spec/markdowntest_spec.rb
168
+ - spec/lib/constants.rb
169
+ - spec/lib/helpers.rb
170
+ - spec/lib/matchers.rb
171
+ - bin/bluecloth
172
+ - lib/bluecloth.rb
173
+ - ext/bluecloth.c
174
+ - ext/docheader.c
175
+ - ext/generate.c
176
+ - ext/markdown.c
177
+ - ext/mkdio.c
178
+ - ext/resource.c
179
+ - ext/version.c
180
+ - ext/amalloc.h
181
+ - ext/config.h
182
+ - ext/cstring.h
183
+ - ext/markdown.h
184
+ - ext/mkdio.h
185
+ - ext/extconf.rb
186
+ - rake/191_compat.rb
187
+ - rake/dependencies.rb
188
+ - rake/helpers.rb
189
+ - rake/manual.rb
190
+ - rake/packaging.rb
191
+ - rake/publishing.rb
192
+ - rake/rdoc.rb
193
+ - rake/style.rb
194
+ - rake/svn.rb
195
+ - rake/testing.rb
196
+ - rake/verifytask.rb
197
+ - rake/win32.rb
198
+ - spec/data/antsugar.txt
199
+ - spec/data/ml-announce.txt
200
+ - spec/data/re-overflow.txt
201
+ - spec/data/re-overflow2.txt
202
+ - spec/data/markdowntest/Amps and angle encoding.text
203
+ - spec/data/markdowntest/Auto links.text
204
+ - spec/data/markdowntest/Backslash escapes.text
205
+ - spec/data/markdowntest/Blockquotes with code blocks.text
206
+ - spec/data/markdowntest/Code Blocks.text
207
+ - spec/data/markdowntest/Code Spans.text
208
+ - spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.text
209
+ - spec/data/markdowntest/Horizontal rules.text
210
+ - spec/data/markdowntest/Inline HTML (Advanced).text
211
+ - spec/data/markdowntest/Inline HTML (Simple).text
212
+ - spec/data/markdowntest/Inline HTML comments.text
213
+ - spec/data/markdowntest/Links, inline style.text
214
+ - spec/data/markdowntest/Links, reference style.text
215
+ - spec/data/markdowntest/Links, shortcut references.text
216
+ - spec/data/markdowntest/Literal quotes in titles.text
217
+ - spec/data/markdowntest/Markdown Documentation - Basics.text
218
+ - spec/data/markdowntest/Markdown Documentation - Syntax.text
219
+ - spec/data/markdowntest/Nested blockquotes.text
220
+ - spec/data/markdowntest/Ordered and unordered lists.text
221
+ - spec/data/markdowntest/Strong and em together.text
222
+ - spec/data/markdowntest/Tabs.text
223
+ - spec/data/markdowntest/Tidyness.text
224
+ - spec/data/markdowntest/Amps and angle encoding.html
225
+ - spec/data/markdowntest/Auto links.html
226
+ - spec/data/markdowntest/Backslash escapes.html
227
+ - spec/data/markdowntest/Blockquotes with code blocks.html
228
+ - spec/data/markdowntest/Code Blocks.html
229
+ - spec/data/markdowntest/Code Spans.html
230
+ - spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.html
231
+ - spec/data/markdowntest/Horizontal rules.html
232
+ - spec/data/markdowntest/Inline HTML (Advanced).html
233
+ - spec/data/markdowntest/Inline HTML (Simple).html
234
+ - spec/data/markdowntest/Inline HTML comments.html
235
+ - spec/data/markdowntest/Links, inline style.html
236
+ - spec/data/markdowntest/Links, reference style.html
237
+ - spec/data/markdowntest/Links, shortcut references.html
238
+ - spec/data/markdowntest/Literal quotes in titles.html
239
+ - spec/data/markdowntest/Markdown Documentation - Basics.html
240
+ - spec/data/markdowntest/Markdown Documentation - Syntax.html
241
+ - spec/data/markdowntest/Nested blockquotes.html
242
+ - spec/data/markdowntest/Ordered and unordered lists.html
243
+ - spec/data/markdowntest/Strong and em together.html
244
+ - spec/data/markdowntest/Tabs.html
245
+ - spec/data/markdowntest/Tidyness.html
246
+ - ext/VERSION
247
+ - Rakefile.local
248
+ - LICENSE.discount
249
+ has_rdoc: true
250
+ homepage: http://deveiate.org/projects/BlueCloth/
251
+ post_install_message:
252
+ rdoc_options:
253
+ - -w
254
+ - "4"
255
+ - -SHN
256
+ - -i
257
+ - .
258
+ - -m
259
+ - README
260
+ - -t
261
+ - bluecloth
262
+ - -W
263
+ - http://deveiate.org/projects/BlueCloth/browser/trunk/
264
+ require_paths:
265
+ - lib
266
+ required_ruby_version: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: "0"
271
+ version:
272
+ required_rubygems_version: !ruby/object:Gem::Requirement
273
+ requirements:
274
+ - - ">="
275
+ - !ruby/object:Gem::Version
276
+ version: "0"
277
+ version:
278
+ requirements: []
279
+
280
+ rubyforge_project: bluecloth
281
+ rubygems_version: 1.3.1
282
+ signing_key:
283
+ specification_version: 3
284
+ summary: BlueCloth is a Ruby implementation of Markdown
285
+ test_files:
286
+ - spec/bluecloth/101_changes_spec.rb
287
+ - spec/bluecloth/autolinks_spec.rb
288
+ - spec/bluecloth/blockquotes_spec.rb
289
+ - spec/bluecloth/code_spans_spec.rb
290
+ - spec/bluecloth/emphasis_spec.rb
291
+ - spec/bluecloth/entities_spec.rb
292
+ - spec/bluecloth/hrules_spec.rb
293
+ - spec/bluecloth/images_spec.rb
294
+ - spec/bluecloth/inline_html_spec.rb
295
+ - spec/bluecloth/links_spec.rb
296
+ - spec/bluecloth/lists_spec.rb
297
+ - spec/bluecloth/paragraphs_spec.rb
298
+ - spec/bluecloth/titles_spec.rb
299
+ - spec/bluecloth_spec.rb
300
+ - spec/bugfix_spec.rb
301
+ - spec/contributions_spec.rb
302
+ - spec/markdowntest_spec.rb
303
+ - spec/lib/constants.rb
304
+ - spec/lib/helpers.rb
305
+ - spec/lib/matchers.rb