greenmat 3.2.0.1 → 3.2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +14 -0
- data/CHANGELOG.md +15 -0
- data/greenmat.gemspec +3 -47
- data/lib/greenmat/cli.rb +86 -0
- data/lib/greenmat/version.rb +3 -0
- data/spec/greenmat/markdown_spec.rb +65 -0
- data/spec/spec_helper.rb +90 -0
- data/tasks/generate_xcode_project.rake +5 -0
- data/tasks/greenmat.rake +65 -0
- data/tasks/spec.rake +5 -0
- data/test/MarkdownTest_1.0.3/MarkdownTest.pl +181 -0
- data/test/MarkdownTest_1.0.3/Tests/Amps and angle encoding.html +17 -0
- data/test/MarkdownTest_1.0.3/Tests/Amps and angle encoding.text +21 -0
- data/test/MarkdownTest_1.0.3/Tests/Auto links.html +18 -0
- data/test/MarkdownTest_1.0.3/Tests/Auto links.text +13 -0
- data/test/MarkdownTest_1.0.3/Tests/Backslash escapes.html +118 -0
- data/test/MarkdownTest_1.0.3/Tests/Backslash escapes.text +120 -0
- data/test/MarkdownTest_1.0.3/Tests/Blockquotes with code blocks.html +15 -0
- data/test/MarkdownTest_1.0.3/Tests/Blockquotes with code blocks.text +11 -0
- data/test/MarkdownTest_1.0.3/Tests/Code Blocks.html +18 -0
- data/test/MarkdownTest_1.0.3/Tests/Code Blocks.text +14 -0
- data/test/MarkdownTest_1.0.3/Tests/Code Spans.html +6 -0
- data/test/MarkdownTest_1.0.3/Tests/Code Spans.text +6 -0
- data/test/MarkdownTest_1.0.3/Tests/Hard-wrapped paragraphs with list-like lines.html +8 -0
- data/test/MarkdownTest_1.0.3/Tests/Hard-wrapped paragraphs with list-like lines.text +8 -0
- data/test/MarkdownTest_1.0.3/Tests/Horizontal rules.html +71 -0
- data/test/MarkdownTest_1.0.3/Tests/Horizontal rules.text +67 -0
- data/test/MarkdownTest_1.0.3/Tests/Inline HTML (Advanced).html +15 -0
- data/test/MarkdownTest_1.0.3/Tests/Inline HTML (Advanced).text +15 -0
- data/test/MarkdownTest_1.0.3/Tests/Inline HTML (Simple).html +72 -0
- data/test/MarkdownTest_1.0.3/Tests/Inline HTML (Simple).text +69 -0
- data/test/MarkdownTest_1.0.3/Tests/Inline HTML comments.html +13 -0
- data/test/MarkdownTest_1.0.3/Tests/Inline HTML comments.text +13 -0
- data/test/MarkdownTest_1.0.3/Tests/Links, inline style.html +11 -0
- data/test/MarkdownTest_1.0.3/Tests/Links, inline style.text +12 -0
- data/test/MarkdownTest_1.0.3/Tests/Links, reference style.html +52 -0
- data/test/MarkdownTest_1.0.3/Tests/Links, reference style.text +71 -0
- data/test/MarkdownTest_1.0.3/Tests/Links, shortcut references.html +9 -0
- data/test/MarkdownTest_1.0.3/Tests/Links, shortcut references.text +20 -0
- data/test/MarkdownTest_1.0.3/Tests/Literal quotes in titles.html +3 -0
- data/test/MarkdownTest_1.0.3/Tests/Literal quotes in titles.text +7 -0
- data/test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Basics.html +314 -0
- data/test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Basics.text +306 -0
- data/test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Syntax.html +942 -0
- data/test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Syntax.text +888 -0
- data/test/MarkdownTest_1.0.3/Tests/Nested blockquotes.html +9 -0
- data/test/MarkdownTest_1.0.3/Tests/Nested blockquotes.text +5 -0
- data/test/MarkdownTest_1.0.3/Tests/Ordered and unordered lists.html +148 -0
- data/test/MarkdownTest_1.0.3/Tests/Ordered and unordered lists.text +131 -0
- data/test/MarkdownTest_1.0.3/Tests/Strong and em together.html +7 -0
- data/test/MarkdownTest_1.0.3/Tests/Strong and em together.text +7 -0
- data/test/MarkdownTest_1.0.3/Tests/Tabs.html +25 -0
- data/test/MarkdownTest_1.0.3/Tests/Tabs.text +21 -0
- data/test/MarkdownTest_1.0.3/Tests/Tidyness.html +8 -0
- data/test/MarkdownTest_1.0.3/Tests/Tidyness.text +5 -0
- data/test/MarkdownTest_1.0/MarkdownTest.pl +162 -0
- data/test/MarkdownTest_1.0/Tests/Amps and angle encoding.html +17 -0
- data/test/MarkdownTest_1.0/Tests/Amps and angle encoding.text +21 -0
- data/test/MarkdownTest_1.0/Tests/Auto links.html +18 -0
- data/test/MarkdownTest_1.0/Tests/Auto links.text +13 -0
- data/test/MarkdownTest_1.0/Tests/Backslash escapes.html +102 -0
- data/test/MarkdownTest_1.0/Tests/Backslash escapes.text +104 -0
- data/test/MarkdownTest_1.0/Tests/Blockquotes with code blocks.html +15 -0
- data/test/MarkdownTest_1.0/Tests/Blockquotes with code blocks.text +11 -0
- data/test/MarkdownTest_1.0/Tests/Hard-wrapped paragraphs with list-like lines.html +8 -0
- data/test/MarkdownTest_1.0/Tests/Hard-wrapped paragraphs with list-like lines.text +8 -0
- data/test/MarkdownTest_1.0/Tests/Horizontal rules.html +71 -0
- data/test/MarkdownTest_1.0/Tests/Horizontal rules.text +67 -0
- data/test/MarkdownTest_1.0/Tests/Inline HTML (Advanced).html +14 -0
- data/test/MarkdownTest_1.0/Tests/Inline HTML (Advanced).text +14 -0
- data/test/MarkdownTest_1.0/Tests/Inline HTML (Simple).html +72 -0
- data/test/MarkdownTest_1.0/Tests/Inline HTML (Simple).text +69 -0
- data/test/MarkdownTest_1.0/Tests/Inline HTML comments.html +13 -0
- data/test/MarkdownTest_1.0/Tests/Inline HTML comments.text +13 -0
- data/test/MarkdownTest_1.0/Tests/Links, inline style.html +9 -0
- data/test/MarkdownTest_1.0/Tests/Links, inline style.text +9 -0
- data/test/MarkdownTest_1.0/Tests/Links, reference style.html +18 -0
- data/test/MarkdownTest_1.0/Tests/Links, reference style.text +31 -0
- data/test/MarkdownTest_1.0/Tests/Literal quotes in titles.html +3 -0
- data/test/MarkdownTest_1.0/Tests/Literal quotes in titles.text +7 -0
- data/test/MarkdownTest_1.0/Tests/Markdown Documentation - Basics.html +314 -0
- data/test/MarkdownTest_1.0/Tests/Markdown Documentation - Basics.text +306 -0
- data/test/MarkdownTest_1.0/Tests/Markdown Documentation - Syntax.html +942 -0
- data/test/MarkdownTest_1.0/Tests/Markdown Documentation - Syntax.text +888 -0
- data/test/MarkdownTest_1.0/Tests/Nested blockquotes.html +9 -0
- data/test/MarkdownTest_1.0/Tests/Nested blockquotes.text +5 -0
- data/test/MarkdownTest_1.0/Tests/Ordered and unordered lists.html +137 -0
- data/test/MarkdownTest_1.0/Tests/Ordered and unordered lists.text +122 -0
- data/test/MarkdownTest_1.0/Tests/Strong and em together.html +7 -0
- data/test/MarkdownTest_1.0/Tests/Strong and em together.text +7 -0
- data/test/MarkdownTest_1.0/Tests/Tabs.html +25 -0
- data/test/MarkdownTest_1.0/Tests/Tabs.text +21 -0
- data/test/MarkdownTest_1.0/Tests/Tidyness.html +8 -0
- data/test/MarkdownTest_1.0/Tests/Tidyness.text +5 -0
- data/test/fixtures/benchmark.md +232 -0
- data/test/greenmat_bin_test.rb +80 -0
- metadata +186 -1
@@ -0,0 +1,17 @@
|
|
1
|
+
<p>AT&T has an ampersand in their name.</p>
|
2
|
+
|
3
|
+
<p>AT&T is another way to write it.</p>
|
4
|
+
|
5
|
+
<p>This & that.</p>
|
6
|
+
|
7
|
+
<p>4 < 5.</p>
|
8
|
+
|
9
|
+
<p>6 > 5.</p>
|
10
|
+
|
11
|
+
<p>Here's a <a href="http://example.com/?foo=1&bar=2">link</a> with an ampersand in the URL.</p>
|
12
|
+
|
13
|
+
<p>Here's a link with an amersand in the link text: <a href="http://att.com/" title="AT&T">AT&T</a>.</p>
|
14
|
+
|
15
|
+
<p>Here's an inline <a href="/script?foo=1&bar=2">link</a>.</p>
|
16
|
+
|
17
|
+
<p>Here's an inline <a href="/script?foo=1&bar=2">link</a>.</p>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
AT&T has an ampersand in their name.
|
2
|
+
|
3
|
+
AT&T is another way to write it.
|
4
|
+
|
5
|
+
This & that.
|
6
|
+
|
7
|
+
4 < 5.
|
8
|
+
|
9
|
+
6 > 5.
|
10
|
+
|
11
|
+
Here's a [link] [1] with an ampersand in the URL.
|
12
|
+
|
13
|
+
Here's a link with an amersand in the link text: [AT&T] [2].
|
14
|
+
|
15
|
+
Here's an inline [link](/script?foo=1&bar=2).
|
16
|
+
|
17
|
+
Here's an inline [link](</script?foo=1&bar=2>).
|
18
|
+
|
19
|
+
|
20
|
+
[1]: http://example.com/?foo=1&bar=2
|
21
|
+
[2]: http://att.com/ "AT&T"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<p>Link: <a href="http://example.com/">http://example.com/</a>.</p>
|
2
|
+
|
3
|
+
<p>With an ampersand: <a href="http://example.com/?foo=1&bar=2">http://example.com/?foo=1&bar=2</a></p>
|
4
|
+
|
5
|
+
<ul>
|
6
|
+
<li>In a list?</li>
|
7
|
+
<li><a href="http://example.com/">http://example.com/</a></li>
|
8
|
+
<li>It should.</li>
|
9
|
+
</ul>
|
10
|
+
|
11
|
+
<blockquote>
|
12
|
+
<p>Blockquoted: <a href="http://example.com/">http://example.com/</a></p>
|
13
|
+
</blockquote>
|
14
|
+
|
15
|
+
<p>Auto-links should not occur here: <code><http://example.com/></code></p>
|
16
|
+
|
17
|
+
<pre><code>or here: <http://example.com/>
|
18
|
+
</code></pre>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Link: <http://example.com/>.
|
2
|
+
|
3
|
+
With an ampersand: <http://example.com/?foo=1&bar=2>
|
4
|
+
|
5
|
+
* In a list?
|
6
|
+
* <http://example.com/>
|
7
|
+
* It should.
|
8
|
+
|
9
|
+
> Blockquoted: <http://example.com/>
|
10
|
+
|
11
|
+
Auto-links should not occur here: `<http://example.com/>`
|
12
|
+
|
13
|
+
or here: <http://example.com/>
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<p>These should all get escaped:</p>
|
2
|
+
|
3
|
+
<p>Backslash: \</p>
|
4
|
+
|
5
|
+
<p>Backtick: `</p>
|
6
|
+
|
7
|
+
<p>Asterisk: *</p>
|
8
|
+
|
9
|
+
<p>Underscore: _</p>
|
10
|
+
|
11
|
+
<p>Left brace: {</p>
|
12
|
+
|
13
|
+
<p>Right brace: }</p>
|
14
|
+
|
15
|
+
<p>Left bracket: [</p>
|
16
|
+
|
17
|
+
<p>Right bracket: ]</p>
|
18
|
+
|
19
|
+
<p>Left paren: (</p>
|
20
|
+
|
21
|
+
<p>Right paren: )</p>
|
22
|
+
|
23
|
+
<p>Greater-than: ></p>
|
24
|
+
|
25
|
+
<p>Hash: #</p>
|
26
|
+
|
27
|
+
<p>Period: .</p>
|
28
|
+
|
29
|
+
<p>Bang: !</p>
|
30
|
+
|
31
|
+
<p>Plus: +</p>
|
32
|
+
|
33
|
+
<p>Minus: -</p>
|
34
|
+
|
35
|
+
<p>These should not, because they occur within a code block:</p>
|
36
|
+
|
37
|
+
<pre><code>Backslash: \\
|
38
|
+
|
39
|
+
Backtick: \`
|
40
|
+
|
41
|
+
Asterisk: \*
|
42
|
+
|
43
|
+
Underscore: \_
|
44
|
+
|
45
|
+
Left brace: \{
|
46
|
+
|
47
|
+
Right brace: \}
|
48
|
+
|
49
|
+
Left bracket: \[
|
50
|
+
|
51
|
+
Right bracket: \]
|
52
|
+
|
53
|
+
Left paren: \(
|
54
|
+
|
55
|
+
Right paren: \)
|
56
|
+
|
57
|
+
Greater-than: \>
|
58
|
+
|
59
|
+
Hash: \#
|
60
|
+
|
61
|
+
Period: \.
|
62
|
+
|
63
|
+
Bang: \!
|
64
|
+
|
65
|
+
Plus: \+
|
66
|
+
|
67
|
+
Minus: \-
|
68
|
+
</code></pre>
|
69
|
+
|
70
|
+
<p>Nor should these, which occur in code spans:</p>
|
71
|
+
|
72
|
+
<p>Backslash: <code>\\</code></p>
|
73
|
+
|
74
|
+
<p>Backtick: <code>\`</code></p>
|
75
|
+
|
76
|
+
<p>Asterisk: <code>\*</code></p>
|
77
|
+
|
78
|
+
<p>Underscore: <code>\_</code></p>
|
79
|
+
|
80
|
+
<p>Left brace: <code>\{</code></p>
|
81
|
+
|
82
|
+
<p>Right brace: <code>\}</code></p>
|
83
|
+
|
84
|
+
<p>Left bracket: <code>\[</code></p>
|
85
|
+
|
86
|
+
<p>Right bracket: <code>\]</code></p>
|
87
|
+
|
88
|
+
<p>Left paren: <code>\(</code></p>
|
89
|
+
|
90
|
+
<p>Right paren: <code>\)</code></p>
|
91
|
+
|
92
|
+
<p>Greater-than: <code>\></code></p>
|
93
|
+
|
94
|
+
<p>Hash: <code>\#</code></p>
|
95
|
+
|
96
|
+
<p>Period: <code>\.</code></p>
|
97
|
+
|
98
|
+
<p>Bang: <code>\!</code></p>
|
99
|
+
|
100
|
+
<p>Plus: <code>\+</code></p>
|
101
|
+
|
102
|
+
<p>Minus: <code>\-</code></p>
|
103
|
+
|
104
|
+
|
105
|
+
<p>These should get escaped, even though they're matching pairs for
|
106
|
+
other Markdown constructs:</p>
|
107
|
+
|
108
|
+
<p>*asterisks*</p>
|
109
|
+
|
110
|
+
<p>_underscores_</p>
|
111
|
+
|
112
|
+
<p>`backticks`</p>
|
113
|
+
|
114
|
+
<p>This is a code span with a literal backslash-backtick sequence: <code>\`</code></p>
|
115
|
+
|
116
|
+
<p>This is a tag with unescaped backticks <span attr='`ticks`'>bar</span>.</p>
|
117
|
+
|
118
|
+
<p>This is a tag with backslashes <span attr='\\backslashes\\'>bar</span>.</p>
|
@@ -0,0 +1,120 @@
|
|
1
|
+
These should all get escaped:
|
2
|
+
|
3
|
+
Backslash: \\
|
4
|
+
|
5
|
+
Backtick: \`
|
6
|
+
|
7
|
+
Asterisk: \*
|
8
|
+
|
9
|
+
Underscore: \_
|
10
|
+
|
11
|
+
Left brace: \{
|
12
|
+
|
13
|
+
Right brace: \}
|
14
|
+
|
15
|
+
Left bracket: \[
|
16
|
+
|
17
|
+
Right bracket: \]
|
18
|
+
|
19
|
+
Left paren: \(
|
20
|
+
|
21
|
+
Right paren: \)
|
22
|
+
|
23
|
+
Greater-than: \>
|
24
|
+
|
25
|
+
Hash: \#
|
26
|
+
|
27
|
+
Period: \.
|
28
|
+
|
29
|
+
Bang: \!
|
30
|
+
|
31
|
+
Plus: \+
|
32
|
+
|
33
|
+
Minus: \-
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
These should not, because they occur within a code block:
|
38
|
+
|
39
|
+
Backslash: \\
|
40
|
+
|
41
|
+
Backtick: \`
|
42
|
+
|
43
|
+
Asterisk: \*
|
44
|
+
|
45
|
+
Underscore: \_
|
46
|
+
|
47
|
+
Left brace: \{
|
48
|
+
|
49
|
+
Right brace: \}
|
50
|
+
|
51
|
+
Left bracket: \[
|
52
|
+
|
53
|
+
Right bracket: \]
|
54
|
+
|
55
|
+
Left paren: \(
|
56
|
+
|
57
|
+
Right paren: \)
|
58
|
+
|
59
|
+
Greater-than: \>
|
60
|
+
|
61
|
+
Hash: \#
|
62
|
+
|
63
|
+
Period: \.
|
64
|
+
|
65
|
+
Bang: \!
|
66
|
+
|
67
|
+
Plus: \+
|
68
|
+
|
69
|
+
Minus: \-
|
70
|
+
|
71
|
+
|
72
|
+
Nor should these, which occur in code spans:
|
73
|
+
|
74
|
+
Backslash: `\\`
|
75
|
+
|
76
|
+
Backtick: `` \` ``
|
77
|
+
|
78
|
+
Asterisk: `\*`
|
79
|
+
|
80
|
+
Underscore: `\_`
|
81
|
+
|
82
|
+
Left brace: `\{`
|
83
|
+
|
84
|
+
Right brace: `\}`
|
85
|
+
|
86
|
+
Left bracket: `\[`
|
87
|
+
|
88
|
+
Right bracket: `\]`
|
89
|
+
|
90
|
+
Left paren: `\(`
|
91
|
+
|
92
|
+
Right paren: `\)`
|
93
|
+
|
94
|
+
Greater-than: `\>`
|
95
|
+
|
96
|
+
Hash: `\#`
|
97
|
+
|
98
|
+
Period: `\.`
|
99
|
+
|
100
|
+
Bang: `\!`
|
101
|
+
|
102
|
+
Plus: `\+`
|
103
|
+
|
104
|
+
Minus: `\-`
|
105
|
+
|
106
|
+
|
107
|
+
These should get escaped, even though they're matching pairs for
|
108
|
+
other Markdown constructs:
|
109
|
+
|
110
|
+
\*asterisks\*
|
111
|
+
|
112
|
+
\_underscores\_
|
113
|
+
|
114
|
+
\`backticks\`
|
115
|
+
|
116
|
+
This is a code span with a literal backslash-backtick sequence: `` \` ``
|
117
|
+
|
118
|
+
This is a tag with unescaped backticks <span attr='`ticks`'>bar</span>.
|
119
|
+
|
120
|
+
This is a tag with backslashes <span attr='\\backslashes\\'>bar</span>.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<pre><code>code block on the first line
|
2
|
+
</code></pre>
|
3
|
+
|
4
|
+
<p>Regular text.</p>
|
5
|
+
|
6
|
+
<pre><code>code block indented by spaces
|
7
|
+
</code></pre>
|
8
|
+
|
9
|
+
<p>Regular text.</p>
|
10
|
+
|
11
|
+
<pre><code>the lines in this block
|
12
|
+
all contain trailing spaces
|
13
|
+
</code></pre>
|
14
|
+
|
15
|
+
<p>Regular Text.</p>
|
16
|
+
|
17
|
+
<pre><code>code block on the last line
|
18
|
+
</code></pre>
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<p>Dashes:</p>
|
2
|
+
|
3
|
+
<hr />
|
4
|
+
|
5
|
+
<hr />
|
6
|
+
|
7
|
+
<hr />
|
8
|
+
|
9
|
+
<hr />
|
10
|
+
|
11
|
+
<pre><code>---
|
12
|
+
</code></pre>
|
13
|
+
|
14
|
+
<hr />
|
15
|
+
|
16
|
+
<hr />
|
17
|
+
|
18
|
+
<hr />
|
19
|
+
|
20
|
+
<hr />
|
21
|
+
|
22
|
+
<pre><code>- - -
|
23
|
+
</code></pre>
|
24
|
+
|
25
|
+
<p>Asterisks:</p>
|
26
|
+
|
27
|
+
<hr />
|
28
|
+
|
29
|
+
<hr />
|
30
|
+
|
31
|
+
<hr />
|
32
|
+
|
33
|
+
<hr />
|
34
|
+
|
35
|
+
<pre><code>***
|
36
|
+
</code></pre>
|
37
|
+
|
38
|
+
<hr />
|
39
|
+
|
40
|
+
<hr />
|
41
|
+
|
42
|
+
<hr />
|
43
|
+
|
44
|
+
<hr />
|
45
|
+
|
46
|
+
<pre><code>* * *
|
47
|
+
</code></pre>
|
48
|
+
|
49
|
+
<p>Underscores:</p>
|
50
|
+
|
51
|
+
<hr />
|
52
|
+
|
53
|
+
<hr />
|
54
|
+
|
55
|
+
<hr />
|
56
|
+
|
57
|
+
<hr />
|
58
|
+
|
59
|
+
<pre><code>___
|
60
|
+
</code></pre>
|
61
|
+
|
62
|
+
<hr />
|
63
|
+
|
64
|
+
<hr />
|
65
|
+
|
66
|
+
<hr />
|
67
|
+
|
68
|
+
<hr />
|
69
|
+
|
70
|
+
<pre><code>_ _ _
|
71
|
+
</code></pre>
|