maruku 0.2
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.
- data/bin/maruku +25 -0
- data/bin/marutex +29 -0
- data/docs/Makefile +25 -0
- data/docs/char_codes.xml +884 -0
- data/docs/color-package-demo.aux +1 -0
- data/docs/color-package-demo.log +127 -0
- data/docs/color-package-demo.tex +149 -0
- data/docs/index.html +74 -0
- data/docs/markdown_syntax.aux +13 -0
- data/docs/markdown_syntax.html +266 -0
- data/docs/markdown_syntax.log +287 -0
- data/docs/markdown_syntax.md +920 -0
- data/docs/markdown_syntax.out +0 -0
- data/docs/markdown_syntax.pdf +0 -0
- data/docs/markdown_syntax.tex +1203 -0
- data/docs/maruku.aux +13 -0
- data/docs/maruku.html +74 -0
- data/docs/maruku.log +294 -0
- data/docs/maruku.md +394 -0
- data/docs/maruku.out +0 -0
- data/docs/maruku.pdf +0 -0
- data/docs/maruku.tex +548 -0
- data/docs/style.css +65 -0
- data/docs/todo.md +12 -0
- data/lib/maruku.rb +20 -0
- data/lib/maruku/parse_block.rb +577 -0
- data/lib/maruku/parse_span.rb +336 -0
- data/lib/maruku/string_utils.rb +270 -0
- data/lib/maruku/structures.rb +31 -0
- data/lib/maruku/to_html.rb +430 -0
- data/lib/maruku/to_latex.rb +345 -0
- data/lib/maruku/to_latex_strings.rb +330 -0
- data/tests/abbreviations.md +11 -0
- data/tests/blank.md +4 -0
- data/tests/code.md +5 -0
- data/tests/code2.md +8 -0
- data/tests/code3.md +16 -0
- data/tests/email.md +4 -0
- data/tests/entities.md +19 -0
- data/tests/escaping.md +14 -0
- data/tests/extra_dl.md +101 -0
- data/tests/extra_header_id.md +13 -0
- data/tests/extra_table1.md +40 -0
- data/tests/footnotes.md +17 -0
- data/tests/headers.md +10 -0
- data/tests/hrule.md +10 -0
- data/tests/images.md +20 -0
- data/tests/inline_html.md +35 -0
- data/tests/links.md +31 -0
- data/tests/list1.md +4 -0
- data/tests/list2.md +5 -0
- data/tests/list3.md +8 -0
- data/tests/lists.md +32 -0
- data/tests/lists_ol.md +39 -0
- data/tests/misc_sw.md +105 -0
- data/tests/one.md +1 -0
- data/tests/paragraphs.md +13 -0
- data/tests/sss06.md +352 -0
- data/tests/test.md +4 -0
- metadata +113 -0
data/tests/blank.md
ADDED
data/tests/code.md
ADDED
data/tests/code2.md
ADDED
data/tests/code3.md
ADDED
data/tests/email.md
ADDED
data/tests/entities.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Maruku translates HTML entities to the equivalent in LaTeX:
|
|
2
|
+
|
|
3
|
+
Entity | Result
|
|
4
|
+
------------|----------
|
|
5
|
+
`©` | ©
|
|
6
|
+
`£` | £
|
|
7
|
+
`a b` | a b
|
|
8
|
+
`λ` | λ
|
|
9
|
+
`—` | —
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Entity-substitution does not happen in code blocks or inline code.
|
|
13
|
+
|
|
14
|
+
The following should not be translated:
|
|
15
|
+
|
|
16
|
+
©
|
|
17
|
+
|
|
18
|
+
It should read just like this: `©`.
|
|
19
|
+
|
data/tests/escaping.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Hello: ! \! \` \{ \} \[ \] \( \) \# \. \! * \* *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Ora, *emphasis*, **bold**, * <- due asterischi-> * , un underscore-> _ , _emphasis_,
|
|
5
|
+
incre*dible*e!
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
This is `Code with an escape: -> \` <- ` (after)
|
|
9
|
+
|
|
10
|
+
This is ``Code with a special: -> ` <- ``(after)
|
|
11
|
+
|
|
12
|
+
`Start ` of paragraph
|
|
13
|
+
|
|
14
|
+
End of `paragraph `
|
data/tests/extra_dl.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
CSS: style.css
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Apple
|
|
5
|
+
: Pomaceous fruit of plants of the genus Malus in
|
|
6
|
+
the family Rosaceae.
|
|
7
|
+
|
|
8
|
+
Orange
|
|
9
|
+
: The fruit of an evergreen tree of the genus Citrus.
|
|
10
|
+
|
|
11
|
+
***
|
|
12
|
+
|
|
13
|
+
Apple
|
|
14
|
+
: Pomaceous fruit of plants of the genus Malus in
|
|
15
|
+
the family Rosaceae.
|
|
16
|
+
|
|
17
|
+
Orange
|
|
18
|
+
: The fruit of an evergreen tree of the genus Citrus.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
Apple
|
|
24
|
+
: Pomaceous fruit of plants of the genus Malus in
|
|
25
|
+
the family Rosaceae.
|
|
26
|
+
: An american computer company.
|
|
27
|
+
|
|
28
|
+
Orange
|
|
29
|
+
: The fruit of an evergreen tree of the genus Citrus.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
Term 1
|
|
34
|
+
Term 2
|
|
35
|
+
: Definition a
|
|
36
|
+
|
|
37
|
+
Term 3
|
|
38
|
+
: Definition b
|
|
39
|
+
|
|
40
|
+
***
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Term 1
|
|
44
|
+
Term 2
|
|
45
|
+
Term 2a
|
|
46
|
+
Term 2b
|
|
47
|
+
: Definition a
|
|
48
|
+
|
|
49
|
+
Term 3
|
|
50
|
+
: Definition b
|
|
51
|
+
|
|
52
|
+
***
|
|
53
|
+
|
|
54
|
+
Apple
|
|
55
|
+
|
|
56
|
+
: Pomaceous fruit of plants of the genus Malus in
|
|
57
|
+
the family Rosaceae.
|
|
58
|
+
|
|
59
|
+
Orange
|
|
60
|
+
|
|
61
|
+
: The fruit of an evergreen tree of the genus Citrus.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
Term 1
|
|
66
|
+
|
|
67
|
+
: This is a definition with two paragraphs. Lorem ipsum
|
|
68
|
+
dolor sit amet, consectetuer adipiscing elit. Aliquam
|
|
69
|
+
hendrerit mi posuere lectus.
|
|
70
|
+
|
|
71
|
+
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
|
|
72
|
+
vitae, risus.
|
|
73
|
+
|
|
74
|
+
: Second definition for term 1, also wrapped in a paragraph
|
|
75
|
+
because of the blank line preceding it.
|
|
76
|
+
|
|
77
|
+
Term 2
|
|
78
|
+
|
|
79
|
+
: This definition has a code block, a blockquote and a list.
|
|
80
|
+
|
|
81
|
+
code block.
|
|
82
|
+
|
|
83
|
+
> block quote
|
|
84
|
+
> on two lines.
|
|
85
|
+
|
|
86
|
+
1. first list item
|
|
87
|
+
2. second list item
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
Term 1
|
|
92
|
+
Term 2
|
|
93
|
+
Term 2a
|
|
94
|
+
Term 2b
|
|
95
|
+
: Definition a
|
|
96
|
+
|
|
97
|
+
This is a paragraph
|
|
98
|
+
|
|
99
|
+
This is a term
|
|
100
|
+
|
|
101
|
+
: definition
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Header 1 {#header1}
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
Header 2 {#header2}
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
### Header 3 ### {#header3}
|
|
8
|
+
|
|
9
|
+
Then you can create links to different parts of the same document like this:
|
|
10
|
+
|
|
11
|
+
[Link back to header 1](#header1),
|
|
12
|
+
[Link back to header 2](#header2),
|
|
13
|
+
[Link back to header 3](#header3)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
CSS: style.css
|
|
2
|
+
|
|
3
|
+
First Header | Second Header
|
|
4
|
+
------------- | -------------
|
|
5
|
+
Content Cell | Content Cell
|
|
6
|
+
Content Cell | Content Cell
|
|
7
|
+
|
|
8
|
+
***
|
|
9
|
+
|
|
10
|
+
| Item | Value |
|
|
11
|
+
| --------- | -----:|
|
|
12
|
+
| Computer | $1600 |
|
|
13
|
+
| Phone | $12 |
|
|
14
|
+
| Pipe | $1 |
|
|
15
|
+
|
|
16
|
+
***
|
|
17
|
+
|
|
18
|
+
| Function name | Description |
|
|
19
|
+
| ------------- | ------------------------------ |
|
|
20
|
+
| `help()` | Display the help window. |
|
|
21
|
+
| `destroy()` | **Destroy your computer!** |
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
***
|
|
25
|
+
|
|
26
|
+
| Very long long head |
|
|
27
|
+
| :------------ |
|
|
28
|
+
| left |
|
|
29
|
+
|
|
30
|
+
***
|
|
31
|
+
|
|
32
|
+
| Very long long head |
|
|
33
|
+
| -------------------: |
|
|
34
|
+
| right |
|
|
35
|
+
|
|
36
|
+
***
|
|
37
|
+
|
|
38
|
+
| Very long long head |
|
|
39
|
+
| :------------------: |
|
|
40
|
+
| center |
|
data/tests/footnotes.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
That's some text with a footnote [^b] and another [^c] and another [^a].
|
|
2
|
+
|
|
3
|
+
[^a]: And that's the footnote.
|
|
4
|
+
|
|
5
|
+
That's the second paragraph of the footnote.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
[^b]: And that's the footnote.
|
|
9
|
+
This is second sentence (same paragraph).
|
|
10
|
+
|
|
11
|
+
[^c]:
|
|
12
|
+
This is the very long one.
|
|
13
|
+
|
|
14
|
+
That's the second paragraph.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
This is not a footnote.
|
data/tests/headers.md
ADDED
data/tests/hrule.md
ADDED
data/tests/images.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
This page does not utilizes 
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Please mouseover to see the title: 
|
|
6
|
+
|
|
7
|
+
Please mouseover to see the title: 
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
I'll say it one more time: this page does not use ![Cascading Style Sheets] [css]
|
|
11
|
+
|
|
12
|
+
This is double size: ![Cascading Style Sheets] [css2]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
[css]: http://jigsaw.w3.org/css-validator/images/vcss "Optional title attribute"
|
|
17
|
+
|
|
18
|
+
[css2]: http://jigsaw.w3.org/css-validator/images/vcss "Optional title attribute" class=external
|
|
19
|
+
style="border:0;width:188px;height:131px"
|
|
20
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
CSS: style.css
|
|
2
|
+
|
|
3
|
+
Input:
|
|
4
|
+
<em>Emphasis</em>
|
|
5
|
+
Result: <em>Emphasis</em>
|
|
6
|
+
|
|
7
|
+
Input:
|
|
8
|
+
<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
|
9
|
+
Result: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<div markdown="1">
|
|
13
|
+
This is *true* markdown text (paragraph)
|
|
14
|
+
|
|
15
|
+
<p markdown="1">
|
|
16
|
+
This is *true* markdown text (no paragraph)
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<table>
|
|
21
|
+
<tr>
|
|
22
|
+
<td markdown="1">This is *true* markdown text. (no par)</td>
|
|
23
|
+
<td markdown="block">This is *true* markdown text. (par)</td>
|
|
24
|
+
</tr>
|
|
25
|
+
</table>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
The following is invalid HTML, and will generate an error:
|
|
29
|
+
|
|
30
|
+
<table>
|
|
31
|
+
<td markdown="1">This is *true* markdown text. (no par)</td>
|
|
32
|
+
<td markdown="block">This is *true* markdown text. (par)</td>
|
|
33
|
+
</tr>
|
|
34
|
+
</table>
|
|
35
|
+
|
data/tests/links.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
Search on [Google][]
|
|
3
|
+
|
|
4
|
+
Search on [Google] []
|
|
5
|
+
|
|
6
|
+
Search on [Google] [google]
|
|
7
|
+
|
|
8
|
+
Search on [Google] [Google]
|
|
9
|
+
|
|
10
|
+
Search on [Google images][]
|
|
11
|
+
|
|
12
|
+
Search on [Google images][ GoOgle search ]
|
|
13
|
+
|
|
14
|
+
Search on <http://www.gogole.com> or <http://Here.com> or ask <mailto:bill@google.com>
|
|
15
|
+
or you might ask bill@google.com.
|
|
16
|
+
|
|
17
|
+
If all else fails, ask [Google](http://www.google.com)
|
|
18
|
+
|
|
19
|
+
[google]: http://www.google.com
|
|
20
|
+
|
|
21
|
+
[google2]: http://www.google.com 'Single quotes'
|
|
22
|
+
|
|
23
|
+
[google3]: http://www.google.com "Double quotes"
|
|
24
|
+
|
|
25
|
+
[google4]: http://www.google.com (Parenthesis)
|
|
26
|
+
|
|
27
|
+
[Google Search]:
|
|
28
|
+
http://www.google.com "Google search"
|
|
29
|
+
|
|
30
|
+
[Google Images]:
|
|
31
|
+
http://images.google.com (Google images)
|
data/tests/list1.md
ADDED
data/tests/list2.md
ADDED
data/tests/list3.md
ADDED
data/tests/lists.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
|
2
|
+
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
|
|
3
|
+
viverra nec, fringilla in, laoreet vitae, risus.
|
|
4
|
+
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
5
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
6
|
+
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
7
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
8
|
+
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
9
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
10
|
+
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
11
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
12
|
+
|
|
13
|
+
Ancora
|
|
14
|
+
|
|
15
|
+
* This is a list item with two paragraphs. Lorem ipsum dolor
|
|
16
|
+
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
|
|
17
|
+
mi posuere lectus.
|
|
18
|
+
|
|
19
|
+
ATTENZIONE!
|
|
20
|
+
|
|
21
|
+
* Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Ancora
|
|
25
|
+
|
|
26
|
+
* This is a list item with two paragraphs.
|
|
27
|
+
|
|
28
|
+
This is the second paragraph in the list item. You're
|
|
29
|
+
only required to indent the first line. Lorem ipsum dolor
|
|
30
|
+
sit amet, consectetuer adipiscing elit.
|
|
31
|
+
|
|
32
|
+
* Another item in the same list.
|
data/tests/lists_ol.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
|
2
|
+
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
|
|
3
|
+
viverra nec, fringilla in, laoreet vitae, risus.
|
|
4
|
+
2. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
5
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
6
|
+
3. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
7
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
8
|
+
3. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
9
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
10
|
+
4. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
|
11
|
+
Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
12
|
+
|
|
13
|
+
Ancora
|
|
14
|
+
|
|
15
|
+
1. This is a list item with two paragraphs. Lorem ipsum dolor
|
|
16
|
+
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
|
|
17
|
+
mi posuere lectus.
|
|
18
|
+
|
|
19
|
+
ATTENZIONE!
|
|
20
|
+
|
|
21
|
+
- Uno
|
|
22
|
+
- Due
|
|
23
|
+
1. tre
|
|
24
|
+
1. tre
|
|
25
|
+
1. tre
|
|
26
|
+
- Due
|
|
27
|
+
|
|
28
|
+
2. Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Ancora
|
|
32
|
+
|
|
33
|
+
* This is a list item with two paragraphs.
|
|
34
|
+
|
|
35
|
+
This is the second paragraph in the list item. You're
|
|
36
|
+
only required to indent the first line. Lorem ipsum dolor
|
|
37
|
+
sit amet, consectetuer adipiscing elit.
|
|
38
|
+
|
|
39
|
+
* Another item in the same list.
|