RedCloth 4.1.0-universal-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of RedCloth might be problematic. Click here for more details.
- data/CHANGELOG +103 -0
- data/COPYING +18 -0
- data/Manifest +57 -0
- data/README +156 -0
- data/Rakefile +205 -0
- data/RedCloth.gemspec +141 -0
- data/bin/redcloth +28 -0
- data/ext/mingw-rbconfig.rb +176 -0
- data/ext/redcloth_scan/extconf.rb +9 -0
- data/ext/redcloth_scan/redcloth.h +164 -0
- data/ext/redcloth_scan/redcloth_attributes.c.rl +56 -0
- data/ext/redcloth_scan/redcloth_attributes.java.rl +96 -0
- data/ext/redcloth_scan/redcloth_attributes.rl +33 -0
- data/ext/redcloth_scan/redcloth_common.c.rl +18 -0
- data/ext/redcloth_scan/redcloth_common.java.rl +18 -0
- data/ext/redcloth_scan/redcloth_common.rl +111 -0
- data/ext/redcloth_scan/redcloth_inline.c.rl +159 -0
- data/ext/redcloth_scan/redcloth_inline.java.rl +108 -0
- data/ext/redcloth_scan/redcloth_inline.rl +157 -0
- data/ext/redcloth_scan/redcloth_scan.c.rl +227 -0
- data/ext/redcloth_scan/redcloth_scan.java.rl +555 -0
- data/ext/redcloth_scan/redcloth_scan.rl +323 -0
- data/extras/ragel_profiler.rb +73 -0
- data/lib/case_sensitive_require/RedCloth.rb +6 -0
- data/lib/redcloth.rb +37 -0
- data/lib/redcloth/erb_extension.rb +27 -0
- data/lib/redcloth/formatters/base.rb +57 -0
- data/lib/redcloth/formatters/html.rb +349 -0
- data/lib/redcloth/formatters/latex.rb +249 -0
- data/lib/redcloth/formatters/latex_entities.yml +2414 -0
- data/lib/redcloth/textile_doc.rb +105 -0
- data/lib/redcloth/version.rb +28 -0
- data/lib/redcloth_scan.jar +0 -0
- data/setup.rb +1585 -0
- data/test/basic.yml +870 -0
- data/test/code.yml +229 -0
- data/test/definitions.yml +82 -0
- data/test/extra_whitespace.yml +64 -0
- data/test/filter_html.yml +177 -0
- data/test/filter_pba.yml +20 -0
- data/test/helper.rb +108 -0
- data/test/html.yml +305 -0
- data/test/images.yml +246 -0
- data/test/instiki.yml +38 -0
- data/test/links.yml +259 -0
- data/test/lists.yml +283 -0
- data/test/poignant.yml +89 -0
- data/test/sanitize_html.yml +42 -0
- data/test/table.yml +267 -0
- data/test/test_custom_tags.rb +46 -0
- data/test/test_erb.rb +13 -0
- data/test/test_extensions.rb +31 -0
- data/test/test_formatters.rb +24 -0
- data/test/test_parser.rb +73 -0
- data/test/test_restrictions.rb +41 -0
- data/test/textism.yml +480 -0
- data/test/threshold.yml +772 -0
- data/test/validate_fixtures.rb +73 -0
- metadata +139 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
require 'erb'
|
5
|
+
require 'w3c_validators'
|
6
|
+
|
7
|
+
class ValidateFixtures < Test::Unit::TestCase
|
8
|
+
include W3CValidators
|
9
|
+
|
10
|
+
def setup
|
11
|
+
@v = MarkupValidator.new
|
12
|
+
sleep 1 # delay per WC3 request
|
13
|
+
end
|
14
|
+
|
15
|
+
HTML_4_0_TEMPLATE = <<EOD
|
16
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
17
|
+
<html>
|
18
|
+
<head>
|
19
|
+
<title><%= test_name %></title>
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
<%= content %>
|
23
|
+
</body>
|
24
|
+
</html>
|
25
|
+
EOD
|
26
|
+
XHTML_1_0_TEMPLATE = <<EOD
|
27
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
28
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
29
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
30
|
+
<head>
|
31
|
+
<title><%= test_name %></title>
|
32
|
+
</head>
|
33
|
+
<body>
|
34
|
+
<%= content %>
|
35
|
+
</body>
|
36
|
+
</html>
|
37
|
+
EOD
|
38
|
+
|
39
|
+
fixtures.each do |name, doc|
|
40
|
+
if doc['html'] && (doc['valid_html'].nil? || doc['valid_html'])
|
41
|
+
define_method("test_html_output_validity_of_#{name}") do
|
42
|
+
assert_produces_valid_html(name, doc['html'])
|
43
|
+
end
|
44
|
+
define_method("test_xhtml_output_validity_of_#{name}") do
|
45
|
+
assert_produces_valid_xhtml(name, doc['html'])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
def assert_produces_valid_html(test_name, content)
|
52
|
+
body = ERB.new(HTML_4_0_TEMPLATE, nil,'-%').result(binding)
|
53
|
+
assert_validates(body)
|
54
|
+
end
|
55
|
+
|
56
|
+
def assert_produces_valid_xhtml(test_name, content)
|
57
|
+
body = ERB.new(XHTML_1_0_TEMPLATE, nil,'-%').result(binding)
|
58
|
+
assert_validates(body)
|
59
|
+
end
|
60
|
+
|
61
|
+
def assert_validates(body)
|
62
|
+
results = @v.validate_text(body)
|
63
|
+
errors = results.errors
|
64
|
+
warnings = results.warnings.reject {|w| w.message_id == "247" } # NET-enabling start-tag requires SHORTTAG YES.
|
65
|
+
|
66
|
+
assert(errors.empty?, "Validator errors: \n" +
|
67
|
+
errors.collect {|e| "'#{e.to_s}'"}.join("\n"))
|
68
|
+
|
69
|
+
assert(warnings.empty?, "Validator warnings: \n" +
|
70
|
+
warnings.collect {|w| "'#{w.to_s}'"}.join("\n"))
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
metadata
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
extensions: []
|
3
|
+
|
4
|
+
homepage: http://redcloth.org
|
5
|
+
executables:
|
6
|
+
- redcloth
|
7
|
+
version: !ruby/object:Gem::Version
|
8
|
+
version: 4.1.0
|
9
|
+
post_install_message:
|
10
|
+
date: 2008-11-03 05:00:00 +00:00
|
11
|
+
files:
|
12
|
+
- bin/redcloth
|
13
|
+
- CHANGELOG
|
14
|
+
- COPYING
|
15
|
+
- ext/mingw-rbconfig.rb
|
16
|
+
- ext/redcloth_scan/extconf.rb
|
17
|
+
- ext/redcloth_scan/redcloth.h
|
18
|
+
- ext/redcloth_scan/redcloth_attributes.c.rl
|
19
|
+
- ext/redcloth_scan/redcloth_attributes.java.rl
|
20
|
+
- ext/redcloth_scan/redcloth_attributes.rl
|
21
|
+
- ext/redcloth_scan/redcloth_common.c.rl
|
22
|
+
- ext/redcloth_scan/redcloth_common.java.rl
|
23
|
+
- ext/redcloth_scan/redcloth_common.rl
|
24
|
+
- ext/redcloth_scan/redcloth_inline.c.rl
|
25
|
+
- ext/redcloth_scan/redcloth_inline.java.rl
|
26
|
+
- ext/redcloth_scan/redcloth_inline.rl
|
27
|
+
- ext/redcloth_scan/redcloth_scan.c.rl
|
28
|
+
- ext/redcloth_scan/redcloth_scan.java.rl
|
29
|
+
- ext/redcloth_scan/redcloth_scan.rl
|
30
|
+
- extras/ragel_profiler.rb
|
31
|
+
- lib/case_sensitive_require/RedCloth.rb
|
32
|
+
- lib/redcloth/erb_extension.rb
|
33
|
+
- lib/redcloth/formatters/base.rb
|
34
|
+
- lib/redcloth/formatters/html.rb
|
35
|
+
- lib/redcloth/formatters/latex.rb
|
36
|
+
- lib/redcloth/formatters/latex_entities.yml
|
37
|
+
- lib/redcloth/textile_doc.rb
|
38
|
+
- lib/redcloth/version.rb
|
39
|
+
- lib/redcloth.rb
|
40
|
+
- Manifest
|
41
|
+
- Rakefile
|
42
|
+
- README
|
43
|
+
- RedCloth.gemspec
|
44
|
+
- setup.rb
|
45
|
+
- test/basic.yml
|
46
|
+
- test/code.yml
|
47
|
+
- test/definitions.yml
|
48
|
+
- test/extra_whitespace.yml
|
49
|
+
- test/filter_html.yml
|
50
|
+
- test/filter_pba.yml
|
51
|
+
- test/helper.rb
|
52
|
+
- test/html.yml
|
53
|
+
- test/images.yml
|
54
|
+
- test/instiki.yml
|
55
|
+
- test/links.yml
|
56
|
+
- test/lists.yml
|
57
|
+
- test/poignant.yml
|
58
|
+
- test/sanitize_html.yml
|
59
|
+
- test/table.yml
|
60
|
+
- test/test_custom_tags.rb
|
61
|
+
- test/test_erb.rb
|
62
|
+
- test/test_extensions.rb
|
63
|
+
- test/test_formatters.rb
|
64
|
+
- test/test_parser.rb
|
65
|
+
- test/test_restrictions.rb
|
66
|
+
- test/textism.yml
|
67
|
+
- test/threshold.yml
|
68
|
+
- test/validate_fixtures.rb
|
69
|
+
- lib/redcloth_scan.jar
|
70
|
+
rubygems_version: 1.2.0
|
71
|
+
rdoc_options:
|
72
|
+
- --line-numbers
|
73
|
+
- --inline-source
|
74
|
+
- --title
|
75
|
+
- RedCloth
|
76
|
+
- --main
|
77
|
+
- README
|
78
|
+
signing_key:
|
79
|
+
cert_chain: []
|
80
|
+
|
81
|
+
name: RedCloth
|
82
|
+
has_rdoc: true
|
83
|
+
platform: universal-java
|
84
|
+
summary: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
|
85
|
+
default_executable:
|
86
|
+
bindir: bin
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
version:
|
89
|
+
requirements:
|
90
|
+
- - '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: "1.2"
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
version:
|
95
|
+
requirements:
|
96
|
+
- - '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 1.8.4
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
- ext
|
102
|
+
specification_version: 2
|
103
|
+
test_files:
|
104
|
+
- test/test_custom_tags.rb
|
105
|
+
- test/test_erb.rb
|
106
|
+
- test/test_extensions.rb
|
107
|
+
- test/test_formatters.rb
|
108
|
+
- test/test_parser.rb
|
109
|
+
- test/test_restrictions.rb
|
110
|
+
dependencies:
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
type: :development
|
113
|
+
name: echoe
|
114
|
+
version_requirement:
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
version:
|
117
|
+
requirements:
|
118
|
+
- - '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: "0"
|
121
|
+
description: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
|
122
|
+
email: redcloth-upwards@rubyforge.org
|
123
|
+
authors:
|
124
|
+
- Jason Garber
|
125
|
+
extra_rdoc_files:
|
126
|
+
- CHANGELOG
|
127
|
+
- lib/case_sensitive_require/RedCloth.rb
|
128
|
+
- lib/redcloth/erb_extension.rb
|
129
|
+
- lib/redcloth/formatters/base.rb
|
130
|
+
- lib/redcloth/formatters/html.rb
|
131
|
+
- lib/redcloth/formatters/latex.rb
|
132
|
+
- lib/redcloth/textile_doc.rb
|
133
|
+
- lib/redcloth/version.rb
|
134
|
+
- lib/redcloth.rb
|
135
|
+
- README
|
136
|
+
requirements: []
|
137
|
+
|
138
|
+
rubyforge_project: redcloth
|
139
|
+
autorequire:
|