gitlab-markup 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +1 -1
- data/Gemfile +0 -8
- data/HISTORY.md +8 -0
- data/README.md +0 -4
- data/gitlab-markup.gemspec +13 -5
- data/lib/github/markup/rdoc.rb +7 -5
- data/lib/github/markups.rb +0 -19
- data/lib/github-markup.rb +1 -1
- data/test/markup_test.rb +7 -7
- metadata +92 -30
- data/lib/github/markup/markdown.rb +0 -60
- data/test/markups/README.asciidoc +0 -23
- data/test/markups/README.asciidoc.html +0 -59
- data/test/markups/README.litcoffee +0 -59
- data/test/markups/README.litcoffee.html +0 -66
- data/test/markups/README.markdown +0 -2
- data/test/markups/README.markdown.html +0 -4
- data/test/markups/README.pod +0 -88
- data/test/markups/README.pod.html +0 -85
- data/test/markups/README.rmd +0 -3
- data/test/markups/README.rmd.html +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c7d0b3c13484b4cd816732fcf490e181431fce66c88a28e3cd82116fa9201f5
|
|
4
|
+
data.tar.gz: b869c01afeeafacb2de6351c614342d74ac29251bebefe9136370df2bd4bcbc7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f5115eb4e4bcf451982b92ac03abefad485c8c5a4b20bd03b833b2e4e2b774effa01effc6813b847cbf0e25a753acb68588a17e3c8dac74643d2868542331f0
|
|
7
|
+
data.tar.gz: fa84dbc0162f161276dbd60effc8f4f2c3c894ca8cb44096401aaabf1794ff1ddf9a1ad6e472c60f4c19082a50d34e4d1f218414797a9e4511b60d02823656ba
|
data/.gitlab-ci.yml
CHANGED
data/Gemfile
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
source "http://rubygems.org"
|
|
2
2
|
gemspec
|
|
3
3
|
|
|
4
|
-
gem "redcarpet", :platforms => :ruby
|
|
5
|
-
gem "kramdown", :platforms => :jruby
|
|
6
|
-
gem "RedCloth"
|
|
7
|
-
gem "rdoc", "~> 6.12"
|
|
8
|
-
gem "org-ruby", "~> 0.9"
|
|
9
|
-
gem "creole", "~>0.5.0"
|
|
10
|
-
gem "wikicloth", "=0.8.1", :platforms => :ruby
|
|
11
|
-
gem "asciidoctor", "~> 2.0"
|
|
12
4
|
gem "rake"
|
data/HISTORY.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# History
|
|
2
2
|
|
|
3
|
+
## 2.2.0 (2026-10-15)
|
|
4
|
+
|
|
5
|
+
* [Allow RDoc 8, require Ruby 3.2+](https://gitlab.com/gitlab-org/gitlab-markup/-/merge_requests/62)
|
|
6
|
+
|
|
7
|
+
## 2.1.0 (2026-05-26)
|
|
8
|
+
|
|
9
|
+
* [Remove markdown, asciidoc, litcoffee, and pod rendering; make markup gem dependencies explicit](https://gitlab.com/gitlab-org/gitlab-markup/-/merge_requests/55)
|
|
10
|
+
|
|
3
11
|
## 2.0.0 (2025-02-26)
|
|
4
12
|
|
|
5
13
|
* [Add support for docutils 0.21.2, remove support for 0.16/0.19](https://gitlab.com/gitlab-org/gitlab-markup/-/merge_requests/50)
|
data/README.md
CHANGED
|
@@ -19,16 +19,12 @@ Markups
|
|
|
19
19
|
The following markups are supported. The dependencies listed are required if
|
|
20
20
|
you wish to run the library. You can also run `script/bootstrap` to fetch them all (Python 3 required).
|
|
21
21
|
|
|
22
|
-
* [.markdown, .mdown, .mkdn, .md](http://daringfireball.net/projects/markdown/) -- `gem install redcarpet` (<https://github.com/vmg/redcarpet>)
|
|
23
22
|
* [.textile](http://www.textism.com/tools/textile/) -- `gem install RedCloth`
|
|
24
23
|
* [.rdoc](https://ruby.github.io/rdoc/) -- `gem install rdoc -v 6.12`
|
|
25
24
|
* [.org](http://orgmode.org/) -- `gem install org-ruby`
|
|
26
25
|
* [.creole](http://wikicreole.org/) -- `gem install creole`
|
|
27
26
|
* [.mediawiki, .wiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `gem install wikicloth`
|
|
28
27
|
* [.rst](https://docutils.sourceforge.io/rst.html) -- `pip install docutils`
|
|
29
|
-
* [.asciidoc, .adoc, .asc](http://asciidoc.org/) -- `gem install asciidoctor` (<http://asciidoctor.org>)
|
|
30
|
-
* [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML`
|
|
31
|
-
comes with Perl >= 5.10. Lower versions should install [Pod::Simple](http://search.cpan.org/~dwheeler/Pod-Simple-3.28/lib/Pod/Simple.pod) from CPAN.
|
|
32
28
|
|
|
33
29
|
Installation
|
|
34
30
|
-----------
|
data/gitlab-markup.gemspec
CHANGED
|
@@ -5,19 +5,21 @@ Gem::Specification.new do |s|
|
|
|
5
5
|
s.version = GitHub::Markup::VERSION
|
|
6
6
|
s.summary = 'Fork from github-markup GitLab uses to render non markdown content'
|
|
7
7
|
s.description = 'This gem is used by GitLab to render any non Markdown markup'
|
|
8
|
-
s.authors = ['Chris Wanstrath']
|
|
9
|
-
s.email = '
|
|
8
|
+
s.authors = ['Chris Wanstrath', 'GitLab Engineering Team']
|
|
9
|
+
s.email = 'engineering@gitlab.com'
|
|
10
10
|
s.homepage = 'https://gitlab.com/gitlab-org/gitlab-markup'
|
|
11
11
|
s.license = 'MIT'
|
|
12
12
|
|
|
13
13
|
s.files = `git ls-files`.split($\)
|
|
14
|
-
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
14
|
+
s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
|
15
15
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
|
16
16
|
s.require_paths = %w[lib]
|
|
17
17
|
|
|
18
|
+
s.required_ruby_version = '>= 3.2'
|
|
19
|
+
|
|
18
20
|
s.metadata = {
|
|
19
21
|
'bug_tracker_uri' => 'https://gitlab.com/gitlab-org/gitlab-markup/issues',
|
|
20
|
-
'changelog_uri'
|
|
22
|
+
'changelog_uri' => 'https://gitlab.com/gitlab-org/gitlab-markup/blob/master/HISTORY.md',
|
|
21
23
|
'source_code_uri' => 'https://gitlab.com/gitlab-org/gitlab-markup'
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -28,6 +30,12 @@ Gem::Specification.new do |s|
|
|
|
28
30
|
s.add_development_dependency 'mutex_m', '~> 0.3.0'
|
|
29
31
|
s.add_development_dependency 'nokogiri', '~> 1.13.8'
|
|
30
32
|
s.add_development_dependency 'nokogiri-diff', '~> 0.2.0'
|
|
31
|
-
s.add_development_dependency 'rdoc', '
|
|
33
|
+
s.add_development_dependency 'rdoc', '>= 6.13', '< 9'
|
|
32
34
|
s.add_development_dependency 'sanitize', '~> 6.0.0'
|
|
35
|
+
|
|
36
|
+
s.add_dependency 'RedCloth', '~> 4.3'
|
|
37
|
+
s.add_dependency 'rdoc', '>= 6.13', '< 9'
|
|
38
|
+
s.add_dependency 'org-ruby', '~> 0.9'
|
|
39
|
+
s.add_dependency 'creole', '~> 0.5.0'
|
|
40
|
+
s.add_dependency 'wikicloth', '=0.8.1'
|
|
33
41
|
end
|
data/lib/github/markup/rdoc.rb
CHANGED
|
@@ -10,11 +10,13 @@ module GitHub
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def render(content)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
# RDoc 8 changed ToHtml.new to take keyword arguments instead of
|
|
14
|
+
# an RDoc::Options instance.
|
|
15
|
+
h = if ::RDoc::VERSION.to_i >= 8
|
|
16
|
+
::RDoc::Markup::ToHtml.new
|
|
17
|
+
else
|
|
18
|
+
::RDoc::Markup::ToHtml.new(::RDoc::Options.new)
|
|
19
|
+
end
|
|
18
20
|
h.convert(content)
|
|
19
21
|
end
|
|
20
22
|
|
data/lib/github/markups.rb
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
require "github/markup/markdown"
|
|
2
1
|
require "github/markup/rdoc"
|
|
3
2
|
require "shellwords"
|
|
4
3
|
|
|
5
|
-
markups << GitHub::Markup::Markdown.new
|
|
6
|
-
|
|
7
4
|
markup(:redcloth, /textile/) do |content|
|
|
8
5
|
RedCloth.new(content).to_html
|
|
9
6
|
end
|
|
@@ -27,24 +24,8 @@ markup(:wikicloth, /mediawiki|wiki/) do |content|
|
|
|
27
24
|
wikicloth.to_html(:noedit => true)
|
|
28
25
|
end
|
|
29
26
|
|
|
30
|
-
markup(:asciidoctor, /adoc|asc(iidoc)?/) do |content|
|
|
31
|
-
Asciidoctor::Compliance.unique_id_start_index = 1
|
|
32
|
-
Asciidoctor.convert(content, :safe => :secure, :attributes => %w(showtitle=@ idprefix idseparator=- env=github env-github source-highlighter=html-pipeline))
|
|
33
|
-
end
|
|
34
|
-
|
|
35
27
|
command(
|
|
36
28
|
"python3 #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html",
|
|
37
29
|
/re?st(\.txt)?/,
|
|
38
30
|
"restructuredtext"
|
|
39
31
|
)
|
|
40
|
-
|
|
41
|
-
# pod2html is nice enough to generate a full-on HTML document for us,
|
|
42
|
-
# so we return the favor by ripping out the good parts.
|
|
43
|
-
#
|
|
44
|
-
# Any block passed to `command` will be handed the command's STDOUT for
|
|
45
|
-
# post processing.
|
|
46
|
-
command('/usr/bin/env perl -MPod::Simple::HTML -e Pod::Simple::HTML::go', /pod/, "pod") do |rendered|
|
|
47
|
-
if rendered =~ /<!-- start doc -->\s*(.+)\s*<!-- end doc -->/mi
|
|
48
|
-
$1
|
|
49
|
-
end
|
|
50
|
-
end
|
data/lib/github-markup.rb
CHANGED
data/test/markup_test.rb
CHANGED
|
@@ -79,23 +79,23 @@ message
|
|
|
79
79
|
|
|
80
80
|
def test_knows_what_it_can_and_cannot_render
|
|
81
81
|
assert_equal false, GitHub::Markup.can_render?('README.html')
|
|
82
|
-
assert_equal
|
|
83
|
-
assert_equal
|
|
84
|
-
assert_equal
|
|
82
|
+
assert_equal false, GitHub::Markup.can_render?('README.markdown')
|
|
83
|
+
assert_equal false, GitHub::Markup.can_render?('README.rmd')
|
|
84
|
+
assert_equal false, GitHub::Markup.can_render?('README.Rmd')
|
|
85
85
|
assert_equal false, GitHub::Markup.can_render?('README.cmd')
|
|
86
|
-
assert_equal
|
|
86
|
+
assert_equal false, GitHub::Markup.can_render?('README.litcoffee')
|
|
87
|
+
assert_equal false, GitHub::Markup.can_render?('README.pod')
|
|
88
|
+
assert_equal false, GitHub::Markup.can_render?('README.adoc')
|
|
89
|
+
assert_equal false, GitHub::Markup.can_render?('README.asciidoc')
|
|
87
90
|
end
|
|
88
91
|
|
|
89
92
|
def test_each_render_has_a_name
|
|
90
|
-
assert_equal "markdown", GitHub::Markup.renderer('README.md').name
|
|
91
93
|
assert_equal "redcloth", GitHub::Markup.renderer('README.textile').name
|
|
92
94
|
assert_equal "rdoc", GitHub::Markup.renderer('README.rdoc').name
|
|
93
95
|
assert_equal "org-ruby", GitHub::Markup.renderer('README.org').name
|
|
94
96
|
assert_equal "creole", GitHub::Markup.renderer('README.creole').name
|
|
95
97
|
assert_equal "wikicloth", GitHub::Markup.renderer('README.wiki').name
|
|
96
|
-
assert_equal "asciidoctor", GitHub::Markup.renderer('README.adoc').name
|
|
97
98
|
assert_equal "restructuredtext", GitHub::Markup.renderer('README.rst').name
|
|
98
|
-
assert_equal "pod", GitHub::Markup.renderer('README.pod').name
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
def test_raises_error_if_command_exits_non_zero
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab-markup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Wanstrath
|
|
8
|
+
- GitLab Engineering Team
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: activesupport
|
|
@@ -111,16 +112,22 @@ dependencies:
|
|
|
111
112
|
name: rdoc
|
|
112
113
|
requirement: !ruby/object:Gem::Requirement
|
|
113
114
|
requirements:
|
|
114
|
-
- - "
|
|
115
|
+
- - ">="
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '6.13'
|
|
118
|
+
- - "<"
|
|
115
119
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '
|
|
120
|
+
version: '9'
|
|
117
121
|
type: :development
|
|
118
122
|
prerelease: false
|
|
119
123
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
124
|
requirements:
|
|
121
|
-
- - "
|
|
125
|
+
- - ">="
|
|
126
|
+
- !ruby/object:Gem::Version
|
|
127
|
+
version: '6.13'
|
|
128
|
+
- - "<"
|
|
122
129
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '
|
|
130
|
+
version: '9'
|
|
124
131
|
- !ruby/object:Gem::Dependency
|
|
125
132
|
name: sanitize
|
|
126
133
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -135,8 +142,84 @@ dependencies:
|
|
|
135
142
|
- - "~>"
|
|
136
143
|
- !ruby/object:Gem::Version
|
|
137
144
|
version: 6.0.0
|
|
145
|
+
- !ruby/object:Gem::Dependency
|
|
146
|
+
name: RedCloth
|
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
|
148
|
+
requirements:
|
|
149
|
+
- - "~>"
|
|
150
|
+
- !ruby/object:Gem::Version
|
|
151
|
+
version: '4.3'
|
|
152
|
+
type: :runtime
|
|
153
|
+
prerelease: false
|
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
155
|
+
requirements:
|
|
156
|
+
- - "~>"
|
|
157
|
+
- !ruby/object:Gem::Version
|
|
158
|
+
version: '4.3'
|
|
159
|
+
- !ruby/object:Gem::Dependency
|
|
160
|
+
name: rdoc
|
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
|
162
|
+
requirements:
|
|
163
|
+
- - ">="
|
|
164
|
+
- !ruby/object:Gem::Version
|
|
165
|
+
version: '6.13'
|
|
166
|
+
- - "<"
|
|
167
|
+
- !ruby/object:Gem::Version
|
|
168
|
+
version: '9'
|
|
169
|
+
type: :runtime
|
|
170
|
+
prerelease: false
|
|
171
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
172
|
+
requirements:
|
|
173
|
+
- - ">="
|
|
174
|
+
- !ruby/object:Gem::Version
|
|
175
|
+
version: '6.13'
|
|
176
|
+
- - "<"
|
|
177
|
+
- !ruby/object:Gem::Version
|
|
178
|
+
version: '9'
|
|
179
|
+
- !ruby/object:Gem::Dependency
|
|
180
|
+
name: org-ruby
|
|
181
|
+
requirement: !ruby/object:Gem::Requirement
|
|
182
|
+
requirements:
|
|
183
|
+
- - "~>"
|
|
184
|
+
- !ruby/object:Gem::Version
|
|
185
|
+
version: '0.9'
|
|
186
|
+
type: :runtime
|
|
187
|
+
prerelease: false
|
|
188
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
189
|
+
requirements:
|
|
190
|
+
- - "~>"
|
|
191
|
+
- !ruby/object:Gem::Version
|
|
192
|
+
version: '0.9'
|
|
193
|
+
- !ruby/object:Gem::Dependency
|
|
194
|
+
name: creole
|
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
|
196
|
+
requirements:
|
|
197
|
+
- - "~>"
|
|
198
|
+
- !ruby/object:Gem::Version
|
|
199
|
+
version: 0.5.0
|
|
200
|
+
type: :runtime
|
|
201
|
+
prerelease: false
|
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
203
|
+
requirements:
|
|
204
|
+
- - "~>"
|
|
205
|
+
- !ruby/object:Gem::Version
|
|
206
|
+
version: 0.5.0
|
|
207
|
+
- !ruby/object:Gem::Dependency
|
|
208
|
+
name: wikicloth
|
|
209
|
+
requirement: !ruby/object:Gem::Requirement
|
|
210
|
+
requirements:
|
|
211
|
+
- - '='
|
|
212
|
+
- !ruby/object:Gem::Version
|
|
213
|
+
version: 0.8.1
|
|
214
|
+
type: :runtime
|
|
215
|
+
prerelease: false
|
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
217
|
+
requirements:
|
|
218
|
+
- - '='
|
|
219
|
+
- !ruby/object:Gem::Version
|
|
220
|
+
version: 0.8.1
|
|
138
221
|
description: This gem is used by GitLab to render any non Markdown markup
|
|
139
|
-
email:
|
|
222
|
+
email: engineering@gitlab.com
|
|
140
223
|
executables:
|
|
141
224
|
- gitlab-markup
|
|
142
225
|
extensions: []
|
|
@@ -161,35 +244,24 @@ files:
|
|
|
161
244
|
- lib/github/markup/command_implementation.rb
|
|
162
245
|
- lib/github/markup/gem_implementation.rb
|
|
163
246
|
- lib/github/markup/implementation.rb
|
|
164
|
-
- lib/github/markup/markdown.rb
|
|
165
247
|
- lib/github/markup/rdoc.rb
|
|
166
248
|
- lib/github/markups.rb
|
|
167
249
|
- script/bootstrap
|
|
168
250
|
- script/cibuild
|
|
169
251
|
- test/fixtures/fail.sh
|
|
170
252
|
- test/markup_test.rb
|
|
171
|
-
- test/markups/README.asciidoc
|
|
172
|
-
- test/markups/README.asciidoc.html
|
|
173
253
|
- test/markups/README.creole
|
|
174
254
|
- test/markups/README.creole.html
|
|
175
255
|
- test/markups/README.large.rst
|
|
176
256
|
- test/markups/README.large.rst.html
|
|
177
|
-
- test/markups/README.litcoffee
|
|
178
|
-
- test/markups/README.litcoffee.html
|
|
179
|
-
- test/markups/README.markdown
|
|
180
|
-
- test/markups/README.markdown.html
|
|
181
257
|
- test/markups/README.mediawiki
|
|
182
258
|
- test/markups/README.mediawiki.html
|
|
183
259
|
- test/markups/README.noformat
|
|
184
260
|
- test/markups/README.noformat.html
|
|
185
261
|
- test/markups/README.org
|
|
186
262
|
- test/markups/README.org.html
|
|
187
|
-
- test/markups/README.pod
|
|
188
|
-
- test/markups/README.pod.html
|
|
189
263
|
- test/markups/README.rdoc
|
|
190
264
|
- test/markups/README.rdoc.html
|
|
191
|
-
- test/markups/README.rmd
|
|
192
|
-
- test/markups/README.rmd.html
|
|
193
265
|
- test/markups/README.rst
|
|
194
266
|
- test/markups/README.rst.html
|
|
195
267
|
- test/markups/README.rst.txt
|
|
@@ -214,41 +286,31 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
214
286
|
requirements:
|
|
215
287
|
- - ">="
|
|
216
288
|
- !ruby/object:Gem::Version
|
|
217
|
-
version: '
|
|
289
|
+
version: '3.2'
|
|
218
290
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
291
|
requirements:
|
|
220
292
|
- - ">="
|
|
221
293
|
- !ruby/object:Gem::Version
|
|
222
294
|
version: '0'
|
|
223
295
|
requirements: []
|
|
224
|
-
rubygems_version: 3.
|
|
296
|
+
rubygems_version: 3.7.2
|
|
225
297
|
specification_version: 4
|
|
226
298
|
summary: Fork from github-markup GitLab uses to render non markdown content
|
|
227
299
|
test_files:
|
|
228
300
|
- test/fixtures/fail.sh
|
|
229
301
|
- test/markup_test.rb
|
|
230
|
-
- test/markups/README.asciidoc
|
|
231
|
-
- test/markups/README.asciidoc.html
|
|
232
302
|
- test/markups/README.creole
|
|
233
303
|
- test/markups/README.creole.html
|
|
234
304
|
- test/markups/README.large.rst
|
|
235
305
|
- test/markups/README.large.rst.html
|
|
236
|
-
- test/markups/README.litcoffee
|
|
237
|
-
- test/markups/README.litcoffee.html
|
|
238
|
-
- test/markups/README.markdown
|
|
239
|
-
- test/markups/README.markdown.html
|
|
240
306
|
- test/markups/README.mediawiki
|
|
241
307
|
- test/markups/README.mediawiki.html
|
|
242
308
|
- test/markups/README.noformat
|
|
243
309
|
- test/markups/README.noformat.html
|
|
244
310
|
- test/markups/README.org
|
|
245
311
|
- test/markups/README.org.html
|
|
246
|
-
- test/markups/README.pod
|
|
247
|
-
- test/markups/README.pod.html
|
|
248
312
|
- test/markups/README.rdoc
|
|
249
313
|
- test/markups/README.rdoc.html
|
|
250
|
-
- test/markups/README.rmd
|
|
251
|
-
- test/markups/README.rmd.html
|
|
252
314
|
- test/markups/README.rst
|
|
253
315
|
- test/markups/README.rst.html
|
|
254
316
|
- test/markups/README.rst.txt
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
require "github/markup/implementation"
|
|
2
|
-
|
|
3
|
-
module GitHub
|
|
4
|
-
module Markup
|
|
5
|
-
class Markdown < Implementation
|
|
6
|
-
MARKDOWN_GEMS = {
|
|
7
|
-
"github/markdown" => proc { |content|
|
|
8
|
-
GitHub::Markdown.render(content)
|
|
9
|
-
},
|
|
10
|
-
"redcarpet" => proc { |content|
|
|
11
|
-
Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(content)
|
|
12
|
-
},
|
|
13
|
-
"rdiscount" => proc { |content|
|
|
14
|
-
RDiscount.new(content).to_html
|
|
15
|
-
},
|
|
16
|
-
"maruku" => proc { |content|
|
|
17
|
-
Maruku.new(content).to_html
|
|
18
|
-
},
|
|
19
|
-
"kramdown" => proc { |content|
|
|
20
|
-
Kramdown::Document.new(content).to_html
|
|
21
|
-
},
|
|
22
|
-
"bluecloth" => proc { |content|
|
|
23
|
-
BlueCloth.new(content).to_html
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
def initialize
|
|
28
|
-
super(/md|rmd|mkdn?|mdwn|mdown|markdown|litcoffee/i)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def load
|
|
32
|
-
return if @renderer
|
|
33
|
-
MARKDOWN_GEMS.each do |gem_name, renderer|
|
|
34
|
-
if try_require(gem_name)
|
|
35
|
-
@renderer = renderer
|
|
36
|
-
return
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
raise LoadError, "no suitable markdown gem found"
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def render(content)
|
|
43
|
-
load
|
|
44
|
-
@renderer.call(content)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def name
|
|
48
|
-
"markdown"
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
private
|
|
52
|
-
def try_require(file)
|
|
53
|
-
require file
|
|
54
|
-
true
|
|
55
|
-
rescue LoadError
|
|
56
|
-
false
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
= Document Title
|
|
2
|
-
|
|
3
|
-
== First Section
|
|
4
|
-
|
|
5
|
-
* One
|
|
6
|
-
* Two
|
|
7
|
-
|
|
8
|
-
Refer to <<another-section>> or <<another-section-1>>.
|
|
9
|
-
|
|
10
|
-
== Another Section
|
|
11
|
-
|
|
12
|
-
NOTE: Here is some source code.
|
|
13
|
-
|
|
14
|
-
```ruby
|
|
15
|
-
puts "Hello, World!"
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
* [ ] todo
|
|
19
|
-
* [x] done
|
|
20
|
-
|
|
21
|
-
== Another Section
|
|
22
|
-
|
|
23
|
-
content
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<h1>Document Title</h1>
|
|
2
|
-
<div>
|
|
3
|
-
<h2>First Section</h2>
|
|
4
|
-
<div>
|
|
5
|
-
<div>
|
|
6
|
-
<ul>
|
|
7
|
-
<li>
|
|
8
|
-
<p>One</p>
|
|
9
|
-
</li>
|
|
10
|
-
<li>
|
|
11
|
-
<p>Two</p>
|
|
12
|
-
</li>
|
|
13
|
-
</ul>
|
|
14
|
-
</div>
|
|
15
|
-
<div>
|
|
16
|
-
<p>Refer to <a href="#another-section">Another Section</a> or <a href="#another-section-1">Another Section</a>.</p>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
<div>
|
|
21
|
-
<h2>Another Section</h2>
|
|
22
|
-
<div>
|
|
23
|
-
<div>
|
|
24
|
-
<table>
|
|
25
|
-
<tr>
|
|
26
|
-
<td>
|
|
27
|
-
<div>Note</div>
|
|
28
|
-
</td>
|
|
29
|
-
<td>
|
|
30
|
-
Here is some source code.
|
|
31
|
-
</td>
|
|
32
|
-
</tr>
|
|
33
|
-
</table>
|
|
34
|
-
</div>
|
|
35
|
-
<div>
|
|
36
|
-
<div>
|
|
37
|
-
<pre lang="ruby"><code>puts "Hello, World!"</code></pre>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div>
|
|
41
|
-
<ul>
|
|
42
|
-
<li>
|
|
43
|
-
<p>❏ todo</p>
|
|
44
|
-
</li>
|
|
45
|
-
<li>
|
|
46
|
-
<p>✓ done</p>
|
|
47
|
-
</li>
|
|
48
|
-
</ul>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div>
|
|
53
|
-
<h2>Another Section</h2>
|
|
54
|
-
<div>
|
|
55
|
-
<div>
|
|
56
|
-
<p>content</p>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
Literate CoffeeScript Test
|
|
2
|
-
--------------------------
|
|
3
|
-
|
|
4
|
-
> Taken from https://github.com/jashkenas/coffee-script/blob/master/test/literate.litcoffee
|
|
5
|
-
|
|
6
|
-
comment comment
|
|
7
|
-
|
|
8
|
-
test "basic literate CoffeeScript parsing", ->
|
|
9
|
-
ok yes
|
|
10
|
-
|
|
11
|
-
now with a...
|
|
12
|
-
|
|
13
|
-
test "broken up indentation", ->
|
|
14
|
-
|
|
15
|
-
... broken up ...
|
|
16
|
-
|
|
17
|
-
do ->
|
|
18
|
-
|
|
19
|
-
... nested block.
|
|
20
|
-
|
|
21
|
-
ok yes
|
|
22
|
-
|
|
23
|
-
Code must be separated from text by a blank line.
|
|
24
|
-
|
|
25
|
-
test "code blocks must be preceded by a blank line", ->
|
|
26
|
-
|
|
27
|
-
The next line is part of the text and will not be executed.
|
|
28
|
-
fail()
|
|
29
|
-
|
|
30
|
-
ok yes
|
|
31
|
-
|
|
32
|
-
Code in `backticks is not parsed` and...
|
|
33
|
-
|
|
34
|
-
test "comments in indented blocks work", ->
|
|
35
|
-
do ->
|
|
36
|
-
do ->
|
|
37
|
-
# Regular comment.
|
|
38
|
-
|
|
39
|
-
###
|
|
40
|
-
Block comment.
|
|
41
|
-
###
|
|
42
|
-
|
|
43
|
-
ok yes
|
|
44
|
-
|
|
45
|
-
Regular [Markdown](http://example.com/markdown) features,
|
|
46
|
-
like links and unordered lists, are fine:
|
|
47
|
-
|
|
48
|
-
* I
|
|
49
|
-
|
|
50
|
-
* Am
|
|
51
|
-
|
|
52
|
-
* A
|
|
53
|
-
|
|
54
|
-
* List
|
|
55
|
-
|
|
56
|
-
Tabs work too:
|
|
57
|
-
|
|
58
|
-
test "tabbed code", ->
|
|
59
|
-
ok yes
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<h2>Literate CoffeeScript Test</h2>
|
|
2
|
-
|
|
3
|
-
<blockquote>
|
|
4
|
-
<p>Taken from https://github.com/jashkenas/coffee-script/blob/master/test/literate.litcoffee</p>
|
|
5
|
-
</blockquote>
|
|
6
|
-
|
|
7
|
-
<p>comment comment</p>
|
|
8
|
-
|
|
9
|
-
<pre><code>test "basic literate CoffeeScript parsing", ->
|
|
10
|
-
ok yes
|
|
11
|
-
</code></pre>
|
|
12
|
-
|
|
13
|
-
<p>now with a...</p>
|
|
14
|
-
|
|
15
|
-
<pre><code>test "broken up indentation", ->
|
|
16
|
-
</code></pre>
|
|
17
|
-
|
|
18
|
-
<p>... broken up ...</p>
|
|
19
|
-
|
|
20
|
-
<pre><code> do ->
|
|
21
|
-
</code></pre>
|
|
22
|
-
|
|
23
|
-
<p>... nested block.</p>
|
|
24
|
-
|
|
25
|
-
<pre><code> ok yes
|
|
26
|
-
</code></pre>
|
|
27
|
-
|
|
28
|
-
<p>Code must be separated from text by a blank line.</p>
|
|
29
|
-
|
|
30
|
-
<pre><code>test "code blocks must be preceded by a blank line", ->
|
|
31
|
-
</code></pre>
|
|
32
|
-
|
|
33
|
-
<p>The next line is part of the text and will not be executed.
|
|
34
|
-
fail()</p>
|
|
35
|
-
|
|
36
|
-
<pre><code> ok yes
|
|
37
|
-
</code></pre>
|
|
38
|
-
|
|
39
|
-
<p>Code in <code>backticks is not parsed</code> and...</p>
|
|
40
|
-
|
|
41
|
-
<pre><code>test "comments in indented blocks work", ->
|
|
42
|
-
do ->
|
|
43
|
-
do ->
|
|
44
|
-
# Regular comment.
|
|
45
|
-
|
|
46
|
-
###
|
|
47
|
-
Block comment.
|
|
48
|
-
###
|
|
49
|
-
|
|
50
|
-
ok yes
|
|
51
|
-
</code></pre>
|
|
52
|
-
|
|
53
|
-
<p>Regular <a href="http://example.com/markdown">Markdown</a> features,
|
|
54
|
-
like links and unordered lists, are fine:</p>
|
|
55
|
-
|
|
56
|
-
<ul>
|
|
57
|
-
<li><p>I</p></li>
|
|
58
|
-
<li><p>Am</p></li>
|
|
59
|
-
<li><p>A</p></li>
|
|
60
|
-
<li><p>List</p></li>
|
|
61
|
-
</ul>
|
|
62
|
-
|
|
63
|
-
<p>Tabs work too:</p>
|
|
64
|
-
|
|
65
|
-
<p>test "tabbed code", ->
|
|
66
|
-
ok yes</p>
|
data/test/markups/README.pod
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
=head1 Matrixy
|
|
2
|
-
|
|
3
|
-
=head2 INTRODUCTION
|
|
4
|
-
|
|
5
|
-
This is a port of the MATLAB/Octave programming language to Parrot. See the
|
|
6
|
-
ROADMAP file for more information on the status of this project, and what else
|
|
7
|
-
needs to be done.
|
|
8
|
-
|
|
9
|
-
=head2 ABOUT
|
|
10
|
-
|
|
11
|
-
Primary goals are:
|
|
12
|
-
|
|
13
|
-
=over 4
|
|
14
|
-
|
|
15
|
-
=item * Create a working compiler that understands the majority of the
|
|
16
|
-
MATLAB/Octave programming language.
|
|
17
|
-
|
|
18
|
-
=back
|
|
19
|
-
|
|
20
|
-
=head2 IMPLEMENTATION
|
|
21
|
-
|
|
22
|
-
This project is broken into three primary components:
|
|
23
|
-
|
|
24
|
-
=over 4
|
|
25
|
-
|
|
26
|
-
=item * The first is the parser, located in the C<src/parser/> directory. The
|
|
27
|
-
parser proper is composed of three source files, F<grammar.pg> which is a
|
|
28
|
-
Perl6Grammar file, and F<actions.pm> which is the associated actions file
|
|
29
|
-
written in NQP, and F<grammar-oper.pm> which is the operator precidence parser.
|
|
30
|
-
In addition, several helper functions used by the parser are located in
|
|
31
|
-
C<src/internals>.
|
|
32
|
-
|
|
33
|
-
=item * The second component is the library of builtin functions in the
|
|
34
|
-
C<src/builtins/> directory. These functions are, currently, written primarily in
|
|
35
|
-
PIR. Function names prefixed with an underscore are "private" functions for use
|
|
36
|
-
with the parser. Other functions should have names which are the same as names
|
|
37
|
-
for regular MATLAB or Octave functions, since they will be available to the
|
|
38
|
-
HLL. These are also separated into different namespaces depending on visibility
|
|
39
|
-
and utility.
|
|
40
|
-
|
|
41
|
-
=item * A number of library functions are written in M, or mostly M with some
|
|
42
|
-
inline PIR code in C<toolbox/>.
|
|
43
|
-
|
|
44
|
-
=back
|
|
45
|
-
|
|
46
|
-
=head2 DEPENDENCIES
|
|
47
|
-
|
|
48
|
-
Matrixy depends on these dependencies:
|
|
49
|
-
|
|
50
|
-
=head3 Parrot
|
|
51
|
-
|
|
52
|
-
To get a proper version of Parrot to build Matrixy, you will need to check out
|
|
53
|
-
and build Parrot from source:
|
|
54
|
-
|
|
55
|
-
svn co http://svn.parrot.org/parrot/trunk parrot
|
|
56
|
-
cd parrot
|
|
57
|
-
perl Configure.pl
|
|
58
|
-
make && make test && make install-dev
|
|
59
|
-
|
|
60
|
-
=head3 Parrot-Linear-Algebra
|
|
61
|
-
|
|
62
|
-
The linear algebra package for Parrot is available separately and provides
|
|
63
|
-
functionality required by Matrixy. This includes matrix data types and matrix
|
|
64
|
-
manipulation libraries
|
|
65
|
-
|
|
66
|
-
=head2 BUILDING
|
|
67
|
-
|
|
68
|
-
Once all dependencies are in place, you can build Matrixy using this sequence of
|
|
69
|
-
commands:
|
|
70
|
-
|
|
71
|
-
perl Configure.pl
|
|
72
|
-
nmake test
|
|
73
|
-
|
|
74
|
-
=head2 TODO
|
|
75
|
-
|
|
76
|
-
* Parser
|
|
77
|
-
* Standard Builtins
|
|
78
|
-
* Test against Octave Test Suite.
|
|
79
|
-
|
|
80
|
-
=head2 BUGS
|
|
81
|
-
|
|
82
|
-
Lots!
|
|
83
|
-
|
|
84
|
-
=head2 CONTACT
|
|
85
|
-
|
|
86
|
-
If you need to contact the Matrixy team, go to the project home page at:
|
|
87
|
-
|
|
88
|
-
www.github.com\Whiteknight\matrixy
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<a name="___top"></a>
|
|
2
|
-
|
|
3
|
-
<h1><a name="Matrixy">Matrixy</a></h1>
|
|
4
|
-
|
|
5
|
-
<h2><a name="INTRODUCTION">INTRODUCTION</a></h2>
|
|
6
|
-
|
|
7
|
-
<p>This is a port of the MATLAB/Octave programming language to Parrot.
|
|
8
|
-
See the ROADMAP file for more information on the status of this project,
|
|
9
|
-
and what else needs to be done.</p>
|
|
10
|
-
|
|
11
|
-
<h2><a name="ABOUT">ABOUT</a></h2>
|
|
12
|
-
|
|
13
|
-
<p>Primary goals are:</p>
|
|
14
|
-
|
|
15
|
-
<ul>
|
|
16
|
-
<li>Create a working compiler that understands the majority of the MATLAB/Octave programming language.</li>
|
|
17
|
-
</ul>
|
|
18
|
-
|
|
19
|
-
<h2><a name="IMPLEMENTATION">IMPLEMENTATION</a></h2>
|
|
20
|
-
|
|
21
|
-
<p>This project is broken into three primary components:</p>
|
|
22
|
-
|
|
23
|
-
<ul>
|
|
24
|
-
<li>The first is the parser,
|
|
25
|
-
located in the <code>src/parser/</code> directory.
|
|
26
|
-
The parser proper is composed of three source files,
|
|
27
|
-
<em>grammar.pg</em> which is a Perl6Grammar file,
|
|
28
|
-
and <em>actions.pm</em> which is the associated actions file written in NQP,
|
|
29
|
-
and <em>grammar-oper.pm</em> which is the operator precidence parser.
|
|
30
|
-
In addition,
|
|
31
|
-
several helper functions used by the parser are located in <code>src/internals</code>.</li>
|
|
32
|
-
|
|
33
|
-
<li>The second component is the library of builtin functions in the <code>src/builtins/</code> directory.
|
|
34
|
-
These functions are,
|
|
35
|
-
currently,
|
|
36
|
-
written primarily in PIR.
|
|
37
|
-
Function names prefixed with an underscore are "private" functions for use with the parser.
|
|
38
|
-
Other functions should have names which are the same as names for regular MATLAB or Octave functions,
|
|
39
|
-
since they will be available to the HLL.
|
|
40
|
-
These are also separated into different namespaces depending on visibility and utility.</li>
|
|
41
|
-
|
|
42
|
-
<li>A number of library functions are written in M,
|
|
43
|
-
or mostly M with some inline PIR code in <code>toolbox/</code>.</li>
|
|
44
|
-
</ul>
|
|
45
|
-
|
|
46
|
-
<h2><a name="DEPENDENCIES">DEPENDENCIES</a></h2>
|
|
47
|
-
|
|
48
|
-
<p>Matrixy depends on these dependencies:</p>
|
|
49
|
-
|
|
50
|
-
<h3><a name="Parrot">Parrot</a></h3>
|
|
51
|
-
|
|
52
|
-
<p>To get a proper version of Parrot to build Matrixy,
|
|
53
|
-
you will need to check out and build Parrot from source:</p>
|
|
54
|
-
|
|
55
|
-
<pre> svn co http://svn.parrot.org/parrot/trunk parrot
|
|
56
|
-
cd parrot
|
|
57
|
-
perl Configure.pl
|
|
58
|
-
make && make test && make install-dev</pre>
|
|
59
|
-
|
|
60
|
-
<h3><a name="Parrot-Linear-Algebra">Parrot-Linear-Algebra</a></h3>
|
|
61
|
-
|
|
62
|
-
<p>The linear algebra package for Parrot is available separately and provides functionality required by Matrixy. This includes matrix data types and matrix manipulation libraries</p>
|
|
63
|
-
|
|
64
|
-
<h2><a name="BUILDING">BUILDING</a></h2>
|
|
65
|
-
|
|
66
|
-
<p>Once all dependencies are in place, you can build Matrixy using this sequence of commands:</p>
|
|
67
|
-
|
|
68
|
-
<pre> perl Configure.pl
|
|
69
|
-
nmake test</pre>
|
|
70
|
-
|
|
71
|
-
<h2><a name="TODO">TODO</a></h2>
|
|
72
|
-
|
|
73
|
-
<pre> * Parser
|
|
74
|
-
* Standard Builtins
|
|
75
|
-
* Test against Octave Test Suite.</pre>
|
|
76
|
-
|
|
77
|
-
<h2><a name="BUGS">BUGS</a></h2>
|
|
78
|
-
|
|
79
|
-
<p>Lots!</p>
|
|
80
|
-
|
|
81
|
-
<h2><a name="CONTACT">CONTACT</a></h2>
|
|
82
|
-
|
|
83
|
-
<p>If you need to contact the Matrixy team, go to the project home page at:</p>
|
|
84
|
-
|
|
85
|
-
<p>www.github.com\Whiteknight\matrixy</p>
|
data/test/markups/README.rmd
DELETED