maruku 0.5.2 → 0.5.3
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/Rakefile +73 -0
- data/bin/marutest +13 -13
- data/docs/changelog.html +35 -3
- data/docs/changelog.md +21 -2
- data/docs/entity_test.html +1 -1
- data/docs/exd.html +3 -3
- data/docs/index.html +4 -4
- data/docs/markdown_syntax.html +1 -1
- data/docs/maruku.html +4 -4
- data/docs/maruku.md +7 -2
- data/docs/proposal.html +1 -1
- data/docs/tmp.md +2 -0
- data/lib/maruku/attributes.rb +6 -3
- data/lib/maruku/input/parse_block.rb +5 -4
- data/lib/maruku/input/parse_span_better.rb +1 -1
- data/lib/maruku/input/type_detection.rb +2 -2
- data/lib/maruku/output/to_html.rb +2 -1
- data/lib/maruku/output/to_latex.rb +7 -8
- data/lib/maruku/output/to_latex_entities.rb +4 -4
- data/lib/maruku/tests/new_parser.rb +13 -6
- data/lib/maruku/version.rb +1 -1
- data/tests/diagrams/diagrams.md +248 -0
- data/tests/unittest/bug_def.md +36 -0
- data/tests/unittest/bug_table.md +77 -0
- data/tests/unittest/email.md +2 -2
- data/tests/unittest/entities.md +5 -5
- data/tests/unittest/footnotes.md +3 -3
- data/tests/unittest/images.md +1 -1
- data/tests/unittest/links.md +1 -1
- data/tests/unittest/list2.md +1 -1
- data/tests/unittest/lists.md +1 -1
- data/tests/unittest/lists_ol.md +1 -1
- data/tests/unittest/math/inline.md +1 -1
- data/tests/unittest/math/table2.md +1 -1
- data/tests/unittest/misc_sw.md +3 -3
- data/tests/unittest/references/long_example.md +2 -2
- data/tests/unittest/smartypants.md +4 -4
- data/tests/unittest/table_attributes.md +59 -0
- metadata +8 -3
data/tests/unittest/email.md
CHANGED
@@ -33,9 +33,9 @@ This is an email address:
|
|
33
33
|
|
34
34
|
|
35
35
|
*** Output of Markdown.pl ***
|
36
|
-
<p>This is an email address: <a href="&#
|
36
|
+
<p>This is an email address: <a href="mailto:andrea@invalid.it">andrea@invalid.it</a></p>
|
37
37
|
|
38
38
|
*** Output of Markdown.pl (parsed) ***
|
39
|
-
<p>This is an email address: <a href='&#
|
39
|
+
<p>This is an email address: <a href='&#109;&#x61;&#x69;&#108;&#116;&#x6F;:&#x61;&#x6E;d&#x72;&#x65;&#97;&#64;&#105;&#x6E;v&#x61;&#x6C;&#105;&#x64;&#46;&#105;&#116;'>andrea@invalid.it</a
|
40
40
|
></p
|
41
41
|
>
|
data/tests/unittest/entities.md
CHANGED
@@ -70,11 +70,11 @@ Maruku translates HTML entities to the equivalent in \LaTeX\xspace :
|
|
70
70
|
\begin{tabular}{l|l}
|
71
71
|
Entity&Result\\
|
72
72
|
\hline
|
73
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38copy\char59}&\copyright
|
74
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38pound\char59}&\pounds
|
75
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt a\char38nbsp\char59b}&a~b\\
|
76
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38lambda\char59}&$\lambda
|
77
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38mdash\char59}
|
73
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38copy\char59}&\copyright{}\\
|
74
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38pound\char59}&\pounds{}\\
|
75
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt a\char38nbsp\char59b}&a~{}b\\
|
76
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38lambda\char59}&$\lambda${}\\
|
77
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38mdash\char59}&---{}\\
|
78
78
|
\end{tabular}
|
79
79
|
|
80
80
|
Entity-substitution does not happen in code blocks or inline code.
|
data/tests/unittest/footnotes.md
CHANGED
@@ -70,11 +70,11 @@ md_el(:document,[
|
|
70
70
|
<p>That’s the second paragraph of the footnote.</p>
|
71
71
|
<a href='#fnref:3' rev='footnote'>↩</a></li></ol></div>
|
72
72
|
*** Output of to_latex ***
|
73
|
-
That's some text with a footnote \footnote{And that's the footnote. This is second sentence (same paragraph)} and another \footnote{This is the very long one.
|
73
|
+
That'{}s some text with a footnote \footnote{And that'{}s the footnote. This is second sentence (same paragraph)} and another \footnote{This is the very long one.
|
74
74
|
|
75
|
-
That's the second paragraph.} and another \footnote{And that's the footnote.
|
75
|
+
That'{}s the second paragraph.} and another \footnote{And that'{}s the footnote.
|
76
76
|
|
77
|
-
That's the second paragraph of the footnote.} .
|
77
|
+
That'{}s the second paragraph of the footnote.} .
|
78
78
|
|
79
79
|
This is not a footnote.
|
80
80
|
|
data/tests/unittest/images.md
CHANGED
data/tests/unittest/links.md
CHANGED
@@ -168,7 +168,7 @@ Search on GoogleSearch on GoogleSearch on GoogleSearch on GoogleSearch on Google
|
|
168
168
|
|
169
169
|
<p>Inline with title: <a href="http://google.com "Title"">Google images</a></p>
|
170
170
|
|
171
|
-
<p>Search on <a href="http://www.gogole.com">http://www.gogole.com</a> or <a href="http://Here.com">http://Here.com</a> or ask <a href="&#
|
171
|
+
<p>Search on <a href="http://www.gogole.com">http://www.gogole.com</a> or <a href="http://Here.com">http://Here.com</a> or ask <a href="mailto:bill@google.com">bill@google.com</a>
|
172
172
|
or you might ask bill@google.com.</p>
|
173
173
|
|
174
174
|
<p>If all else fails, ask <a href="http://www.google.com">Google</a></p>
|
data/tests/unittest/list2.md
CHANGED
@@ -42,7 +42,7 @@ md_el(:document,[
|
|
42
42
|
\begin{itemize}%
|
43
43
|
\item This is a list item with two paragraphs.
|
44
44
|
|
45
|
-
This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit
|
45
|
+
This is the second paragraph in the list item. You'{}re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit
|
46
46
|
|
47
47
|
|
48
48
|
\item other
|
data/tests/unittest/lists.md
CHANGED
@@ -147,7 +147,7 @@ Ancora
|
|
147
147
|
\begin{itemize}%
|
148
148
|
\item This is a list item with two paragraphs.
|
149
149
|
|
150
|
-
This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit
|
150
|
+
This is the second paragraph in the list item. You'{}re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit
|
151
151
|
|
152
152
|
|
153
153
|
\item Another item in the same list.
|
data/tests/unittest/lists_ol.md
CHANGED
@@ -206,7 +206,7 @@ Ancora
|
|
206
206
|
\begin{itemize}%
|
207
207
|
\item This is a list item with two paragraphs.
|
208
208
|
|
209
|
-
This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit
|
209
|
+
This is the second paragraph in the list item. You'{}re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit
|
210
210
|
|
211
211
|
|
212
212
|
\item Another item in the same list.
|
data/tests/unittest/misc_sw.md
CHANGED
@@ -420,8 +420,8 @@ Type "help", "copyright", "credits" or "licen
|
|
420
420
|
\begin{itemize}%
|
421
421
|
\item \emph{Operating System} : \href{http://www.apple.com/getamac/}{Mac OS X}: heaven, after the purgatory of Linux and the hell of Windows.
|
422
422
|
\item \emph{Browser}: \href{http://getfirefox.com/}{Firefox}. On a Mac, \href{http://www.caminobrowser.org/}{Camino}.
|
423
|
-
\item \emph{Email}: \href{http://gmail.com/}{GMail}, ``search, don't sort'' really works.
|
424
|
-
\item \emph{Text Editor}: \href{http://www.apple.com/getamac/}{TextMate}, you have to buy it, but it's worth every penny. There are rumours that it's been converting (recovering) Emacs users (addicts). Unfortunately, it's Mac only. An alternative is \href{http://www.jedit.org/}{jedit} (GPL, Java).
|
423
|
+
\item \emph{Email}: \href{http://gmail.com/}{GMail}, ``{}search, don'{}t sort''{} really works.
|
424
|
+
\item \emph{Text Editor}: \href{http://www.apple.com/getamac/}{TextMate}, you have to buy it, but it'{}s worth every penny. There are rumours that it'{}s been converting (recovering) Emacs users (addicts). Unfortunately, it'{}s Mac only. An alternative is \href{http://www.jedit.org/}{jedit} (GPL, Java).
|
425
425
|
|
426
426
|
\end{itemize}
|
427
427
|
\hypertarget{development}{}\subsubsection*{{Development}}\label{development}
|
@@ -449,7 +449,7 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|
449
449
|
\item \emph{Java IDE}: \href{http://www.borland.com/us/products/jbuilder/index.html}{JBuilder} is great software and has a free version (IMHO better than Eclipse). Java is not a pain anymore since it gained \href{http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html}{generics} and got opensourced.
|
450
450
|
|
451
451
|
|
452
|
-
\item \emph{Mark-up language}: HTML is so 2001, why don't you take at look at \href{http://en.wikipedia.org/wiki/Markdown}{Markdown}? \href{data/misc_markdown.png}{Look at the source of this page}.
|
452
|
+
\item \emph{Mark-up language}: HTML is so 2001, why don'{}t you take at look at \href{http://en.wikipedia.org/wiki/Markdown}{Markdown}? \href{data/misc_markdown.png}{Look at the source of this page}.
|
453
453
|
|
454
454
|
|
455
455
|
\item \emph{C++ libraries}: * \href{http://www.trolltech.no/}{QT} for GUIs. * \href{http://www.gnu.org/software/gsl/}{GSL} for math. * \href{http://www.imagemagick.org/Magick++/}{Magick++} for manipulating images. * \href{http://cairographics.org/}{Cairo} for creating PDFs. * \href{http://www.boost.org/}{Boost} for just about everything else.
|
@@ -57,9 +57,9 @@ md_el(:document,[
|
|
57
57
|
<p>To this end, Markdown’s syntax is comprised entirely of punctuation</p>
|
58
58
|
|
59
59
|
*** Output of to_latex ***
|
60
|
-
filters -- including \href{http://docutils.sourceforge.net/mirror/setext.html}{Setext}, \href{http://www.aaronsw.com/2002/atx/}{atx}, \href{http://textism.com/tools/textile/}{Textile}, \href{http://docutils.sourceforge.net/rst.html}{reStructuredText}, \href{http://www.triptico.com/software/grutatxt.html}{Grutatext}, and \href{http://ettext.taint.org/doc/}{EtText} -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.
|
60
|
+
filters --{} including \href{http://docutils.sourceforge.net/mirror/setext.html}{Setext}, \href{http://www.aaronsw.com/2002/atx/}{atx}, \href{http://textism.com/tools/textile/}{Textile}, \href{http://docutils.sourceforge.net/rst.html}{reStructuredText}, \href{http://www.triptico.com/software/grutatxt.html}{Grutatext}, and \href{http://ettext.taint.org/doc/}{EtText} --{} the single biggest source of inspiration for Markdown'{}s syntax is the format of plain text email.
|
61
61
|
|
62
|
-
To this end, Markdown's syntax is comprised entirely of punctuation
|
62
|
+
To this end, Markdown'{}s syntax is comprised entirely of punctuation
|
63
63
|
|
64
64
|
|
65
65
|
*** Output of to_md ***
|
@@ -89,17 +89,17 @@ md_el(:document,[
|
|
89
89
|
|
90
90
|
*** Output of to_latex ***
|
91
91
|
\begin{verbatim}'Twas a "test" to 'remember' in the '90s.\end{verbatim}
|
92
|
-
`Twas a ``test'' to `remember' in the '90s.
|
92
|
+
`{}Twas a ``{}test''{} to `{}remember'{} in the '{}90s.
|
93
93
|
|
94
94
|
\begin{verbatim}It was --- in a sense --- really... interesting.\end{verbatim}
|
95
|
-
It was --- in a sense --- really\ldots
|
95
|
+
It was ---{} in a sense ---{} really\ldots{} interesting.
|
96
96
|
|
97
97
|
\begin{verbatim}I -- too -- met << some curly quotes >> there or <<here>>No space.\end{verbatim}
|
98
|
-
I -- too -- met \guillemotleft
|
98
|
+
I --{} too --{} met \guillemotleft{}~{}some curly quotes~{}\guillemotright{} there or \guillemotleft{}here\guillemotright{}No space.
|
99
99
|
|
100
100
|
\begin{verbatim}She was 6\"12\'.\end{verbatim}
|
101
101
|
\begin{quote}%
|
102
|
-
She was 6"12'.
|
102
|
+
She was 6"{}12'{}.
|
103
103
|
|
104
104
|
|
105
105
|
\end{quote}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
Write a comment here
|
2
|
+
*** Parameters: ***
|
3
|
+
{} # params
|
4
|
+
*** Markdown input: ***
|
5
|
+
|
6
|
+
h | h
|
7
|
+
----------|--
|
8
|
+
{:t} c1 | c2
|
9
|
+
{: summary="Table summary" .class1 style="color:red" border=3 width="50%" frame=lhs rules=cols cellspacing=2em cellpadding=4px}
|
10
|
+
|
11
|
+
{:t: scope="row"}
|
12
|
+
*** Output of inspect ***
|
13
|
+
md_el(:document,[
|
14
|
+
md_el(:table,[
|
15
|
+
md_el(:head_cell,["h"],{},[]),
|
16
|
+
md_el(:head_cell,["h"],{},[]),
|
17
|
+
md_el(:cell,[" c1"],{},[[:ref, "t"]]),
|
18
|
+
md_el(:cell,["c2"],{},[])
|
19
|
+
],{:align=>[:left, :left]},[["summary", "Table summary"], [:class, "class1"], ["style", "color:red"], ["border", "3"], ["width", "50%"], ["frame", "lhs"], ["rules", "cols"], ["cellspacing", "2em"], ["cellpadding", "4px"]]),
|
20
|
+
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"t"},[])
|
21
|
+
],{},[])
|
22
|
+
*** Output of to_html ***
|
23
|
+
<table cellspacing='2em' class='class1' border='3' rules='cols' frame='lhs' summary='Table summary' cellpadding='4px' width='50%' style='color:red'><thead><tr><th>h</th><th>h</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> c1</th><td style='text-align: left;'>c2</td>
|
24
|
+
</tr></tbody></table>
|
25
|
+
*** Output of to_latex ***
|
26
|
+
\begin{tabular}{l|l}
|
27
|
+
h&h\\
|
28
|
+
\hline
|
29
|
+
c1&c2\\
|
30
|
+
\end{tabular}
|
31
|
+
|
32
|
+
|
33
|
+
*** Output of to_md ***
|
34
|
+
hh c1c2
|
35
|
+
*** Output of to_s ***
|
36
|
+
hh c1c2
|
37
|
+
*** EOF ***
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
OK!
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
*** Output of Markdown.pl ***
|
46
|
+
<p>h | h
|
47
|
+
----------|--
|
48
|
+
{:t} c1 | c2
|
49
|
+
{: summary="Table summary" .class1 style="color:red" border=3 width="50%" frame=lhs rules=cols cellspacing=2em cellpadding=4px}</p>
|
50
|
+
|
51
|
+
<p>{:t: scope="row"}</p>
|
52
|
+
|
53
|
+
*** Output of Markdown.pl (parsed) ***
|
54
|
+
<p>h | h
|
55
|
+
----------|--
|
56
|
+
{:t} c1 | c2
|
57
|
+
{: summary="Table summary" .class1 style="color:red" border=3 width="50%" frame=lhs rules=cols cellspacing=2em cellpadding=4px}</p
|
58
|
+
><p>{:t: scope="row"}</p
|
59
|
+
>
|
metadata
CHANGED
@@ -3,9 +3,9 @@ rubygems_version: 0.8.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: maruku
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2007-
|
8
|
-
summary:
|
6
|
+
version: 0.5.3
|
7
|
+
date: 2007-02-05
|
8
|
+
summary: Maruku is a Markdown-superset interpreter written in Ruby.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: andrea@rubyforge.org
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- docs/maruku.md
|
84
84
|
- docs/math.md
|
85
85
|
- docs/proposal.md
|
86
|
+
- docs/tmp.md
|
86
87
|
- docs/changelog.html
|
87
88
|
- docs/entity_test.html
|
88
89
|
- docs/exd.html
|
@@ -126,6 +127,8 @@ files:
|
|
126
127
|
- tests/unittest/abbreviations.md
|
127
128
|
- tests/unittest/blank.md
|
128
129
|
- tests/unittest/blanks_in_code.md
|
130
|
+
- tests/unittest/bug_def.md
|
131
|
+
- tests/unittest/bug_table.md
|
129
132
|
- tests/unittest/code.md
|
130
133
|
- tests/unittest/code2.md
|
131
134
|
- tests/unittest/code3.md
|
@@ -161,6 +164,7 @@ files:
|
|
161
164
|
- tests/unittest/paragraphs.md
|
162
165
|
- tests/unittest/smartypants.md
|
163
166
|
- tests/unittest/syntax_hl.md
|
167
|
+
- tests/unittest/table_attributes.md
|
164
168
|
- tests/unittest/test.md
|
165
169
|
- tests/unittest/wrapping.md
|
166
170
|
- tests/unittest/xml.md
|
@@ -192,6 +196,7 @@ files:
|
|
192
196
|
- bin/maruku
|
193
197
|
- bin/marutest
|
194
198
|
- bin/marutex
|
199
|
+
- Rakefile
|
195
200
|
test_files: []
|
196
201
|
rdoc_options: []
|
197
202
|
extra_rdoc_files: []
|