gitlab-markup 2.0.0 → 2.1.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/Gemfile +0 -8
- data/HISTORY.md +4 -0
- data/README.md +0 -4
- data/gitlab-markup.gemspec +10 -4
- data/lib/github/markups.rb +0 -19
- data/lib/github-markup.rb +1 -1
- data/test/markup_test.rb +7 -7
- metadata +75 -25
- 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: 790926e8c03a6d1e4a383c1bedd246625ca1e9cfe75c23d2fcf8ac88e08c3f93
|
|
4
|
+
data.tar.gz: b0bec8c4d722247d81bb6253634633f7fa82cf9774092f1a1069e86b5ab75433
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7208b88b8a5087edf00ce36318d870219b728202491a87e5d03692c0d262b42a7d1114b8999d04ba671e9c08349d20088ef4c7b13cdb6888639f2eb51630738a
|
|
7
|
+
data.tar.gz: 98152d6bcb1a268f69a1b3c079c5ca21481d5305afd404a58bfd0d7810b7d21a48a6be8c5c70c68807c0f98e55a3a68d0a0351d59f446783012782221f3e2bfc
|
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,9 @@
|
|
|
1
1
|
# History
|
|
2
2
|
|
|
3
|
+
## 2.1.0 (2026-05-26)
|
|
4
|
+
|
|
5
|
+
* [Remove markdown, asciidoc, litcoffee, and pod rendering; make markup gem dependencies explicit](https://gitlab.com/gitlab-org/gitlab-markup/-/merge_requests/55)
|
|
6
|
+
|
|
3
7
|
## 2.0.0 (2025-02-26)
|
|
4
8
|
|
|
5
9
|
* [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,19 @@ 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
18
|
s.metadata = {
|
|
19
19
|
'bug_tracker_uri' => 'https://gitlab.com/gitlab-org/gitlab-markup/issues',
|
|
20
|
-
'changelog_uri'
|
|
20
|
+
'changelog_uri' => 'https://gitlab.com/gitlab-org/gitlab-markup/blob/master/HISTORY.md',
|
|
21
21
|
'source_code_uri' => 'https://gitlab.com/gitlab-org/gitlab-markup'
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -30,4 +30,10 @@ Gem::Specification.new do |s|
|
|
|
30
30
|
s.add_development_dependency 'nokogiri-diff', '~> 0.2.0'
|
|
31
31
|
s.add_development_dependency 'rdoc', '~> 6.12'
|
|
32
32
|
s.add_development_dependency 'sanitize', '~> 6.0.0'
|
|
33
|
+
|
|
34
|
+
s.add_dependency 'RedCloth', '~> 4.3'
|
|
35
|
+
s.add_dependency 'rdoc', '~> 6.13'
|
|
36
|
+
s.add_dependency 'org-ruby', '~> 0.9'
|
|
37
|
+
s.add_dependency 'creole', '~> 0.5.0'
|
|
38
|
+
s.add_dependency 'wikicloth', '=0.8.1'
|
|
33
39
|
end
|
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.1.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
|
|
@@ -135,8 +136,78 @@ dependencies:
|
|
|
135
136
|
- - "~>"
|
|
136
137
|
- !ruby/object:Gem::Version
|
|
137
138
|
version: 6.0.0
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: RedCloth
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - "~>"
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '4.3'
|
|
146
|
+
type: :runtime
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - "~>"
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '4.3'
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: rdoc
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - "~>"
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '6.13'
|
|
160
|
+
type: :runtime
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - "~>"
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '6.13'
|
|
167
|
+
- !ruby/object:Gem::Dependency
|
|
168
|
+
name: org-ruby
|
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
|
170
|
+
requirements:
|
|
171
|
+
- - "~>"
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: '0.9'
|
|
174
|
+
type: :runtime
|
|
175
|
+
prerelease: false
|
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - "~>"
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: '0.9'
|
|
181
|
+
- !ruby/object:Gem::Dependency
|
|
182
|
+
name: creole
|
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
|
184
|
+
requirements:
|
|
185
|
+
- - "~>"
|
|
186
|
+
- !ruby/object:Gem::Version
|
|
187
|
+
version: 0.5.0
|
|
188
|
+
type: :runtime
|
|
189
|
+
prerelease: false
|
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
+
requirements:
|
|
192
|
+
- - "~>"
|
|
193
|
+
- !ruby/object:Gem::Version
|
|
194
|
+
version: 0.5.0
|
|
195
|
+
- !ruby/object:Gem::Dependency
|
|
196
|
+
name: wikicloth
|
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
|
198
|
+
requirements:
|
|
199
|
+
- - '='
|
|
200
|
+
- !ruby/object:Gem::Version
|
|
201
|
+
version: 0.8.1
|
|
202
|
+
type: :runtime
|
|
203
|
+
prerelease: false
|
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
205
|
+
requirements:
|
|
206
|
+
- - '='
|
|
207
|
+
- !ruby/object:Gem::Version
|
|
208
|
+
version: 0.8.1
|
|
138
209
|
description: This gem is used by GitLab to render any non Markdown markup
|
|
139
|
-
email:
|
|
210
|
+
email: engineering@gitlab.com
|
|
140
211
|
executables:
|
|
141
212
|
- gitlab-markup
|
|
142
213
|
extensions: []
|
|
@@ -161,35 +232,24 @@ files:
|
|
|
161
232
|
- lib/github/markup/command_implementation.rb
|
|
162
233
|
- lib/github/markup/gem_implementation.rb
|
|
163
234
|
- lib/github/markup/implementation.rb
|
|
164
|
-
- lib/github/markup/markdown.rb
|
|
165
235
|
- lib/github/markup/rdoc.rb
|
|
166
236
|
- lib/github/markups.rb
|
|
167
237
|
- script/bootstrap
|
|
168
238
|
- script/cibuild
|
|
169
239
|
- test/fixtures/fail.sh
|
|
170
240
|
- test/markup_test.rb
|
|
171
|
-
- test/markups/README.asciidoc
|
|
172
|
-
- test/markups/README.asciidoc.html
|
|
173
241
|
- test/markups/README.creole
|
|
174
242
|
- test/markups/README.creole.html
|
|
175
243
|
- test/markups/README.large.rst
|
|
176
244
|
- 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
245
|
- test/markups/README.mediawiki
|
|
182
246
|
- test/markups/README.mediawiki.html
|
|
183
247
|
- test/markups/README.noformat
|
|
184
248
|
- test/markups/README.noformat.html
|
|
185
249
|
- test/markups/README.org
|
|
186
250
|
- test/markups/README.org.html
|
|
187
|
-
- test/markups/README.pod
|
|
188
|
-
- test/markups/README.pod.html
|
|
189
251
|
- test/markups/README.rdoc
|
|
190
252
|
- test/markups/README.rdoc.html
|
|
191
|
-
- test/markups/README.rmd
|
|
192
|
-
- test/markups/README.rmd.html
|
|
193
253
|
- test/markups/README.rst
|
|
194
254
|
- test/markups/README.rst.html
|
|
195
255
|
- test/markups/README.rst.txt
|
|
@@ -221,34 +281,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
221
281
|
- !ruby/object:Gem::Version
|
|
222
282
|
version: '0'
|
|
223
283
|
requirements: []
|
|
224
|
-
rubygems_version: 3.
|
|
284
|
+
rubygems_version: 3.7.2
|
|
225
285
|
specification_version: 4
|
|
226
286
|
summary: Fork from github-markup GitLab uses to render non markdown content
|
|
227
287
|
test_files:
|
|
228
288
|
- test/fixtures/fail.sh
|
|
229
289
|
- test/markup_test.rb
|
|
230
|
-
- test/markups/README.asciidoc
|
|
231
|
-
- test/markups/README.asciidoc.html
|
|
232
290
|
- test/markups/README.creole
|
|
233
291
|
- test/markups/README.creole.html
|
|
234
292
|
- test/markups/README.large.rst
|
|
235
293
|
- 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
294
|
- test/markups/README.mediawiki
|
|
241
295
|
- test/markups/README.mediawiki.html
|
|
242
296
|
- test/markups/README.noformat
|
|
243
297
|
- test/markups/README.noformat.html
|
|
244
298
|
- test/markups/README.org
|
|
245
299
|
- test/markups/README.org.html
|
|
246
|
-
- test/markups/README.pod
|
|
247
|
-
- test/markups/README.pod.html
|
|
248
300
|
- test/markups/README.rdoc
|
|
249
301
|
- test/markups/README.rdoc.html
|
|
250
|
-
- test/markups/README.rmd
|
|
251
|
-
- test/markups/README.rmd.html
|
|
252
302
|
- test/markups/README.rst
|
|
253
303
|
- test/markups/README.rst.html
|
|
254
304
|
- 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