Re: list corner case

2008-09-08 Thread Andrea Censi
 Either C or E works for me, but I'll settle with A as a lousy
 compromise seeing it already appears to have the popular vote.

+1 for C, for what it's worth.

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
 Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown Extra Spec: Parsing Section

2008-05-08 Thread Andrea Censi
On Thu, May 8, 2008 at 8:59 PM, Michel Fortin [EMAIL PROTECTED] wrote:
 Basically, parsing is defined as three consecutive passes: parsing document
 elements, parsing block elements and parsing span elements.

Looks good so far.

The most delicate part is still to come (defining indentation for
lists, and (X)(HT)ML fragments in the text flow).

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
 Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown doesn't always generate XHTML

2008-03-15 Thread Andrea Censi
On Sat, Mar 15, 2008 at 3:49 AM, Ulf Ochsenfahrt [EMAIL PROTECTED] wrote:
 Waylan Limberg wrote:
   Regarding the security issues, I understand your concerns, but there
   are some situations were all document authors are trusted
   (authenticated) users and have a legitimate need for that feature. We
   can't cut them off for everyone else. However, I know that
   Python-Markdown has an option to not allow any html in a document
   (this safe_mode can be set to either replace with a customizable
   message, remove completely, or escape the html). Of course, to stay in
   line with the Markdown standard, it is off by default, but very easy
   to turn on in your code. Other implementations may offer a similar
   option.

  Yes, there are situations where all document authors are trusted
  (authentication isn't trust though), but the fact remains that this
  makes markdown completely unusable for anything else. And worse, people
  are not made aware of this fact. I only encountered this by coincidence,
  because one of my users entered what looked like html tags into the forum.

  In summary:
  Markdown wasn't designed to handle this situation. Some implementations
  provide a 'safe mode' which aims to filter the code either before or
  after markdown conversion.


  Markdownj (Java, which I've been using) doesn't provide such an option.

  Markdown.pl doesn't provide such an option.

  Nanoki tries to, and fails (see related mail by Michel Fortin) on:

 script !--
  alert(Hello world!)
  /script 

  PHP Markdown has something like this, and it has to be enabled in the
  source (?). It fails when no_markup=true and no_entities=false on:
  scriptalert('hallo');/script

  Python markdown has such an option and it appears to work for simple
  tests. Looking at the code, python markdown apparently creates an XML
  document tree and serializes it, making sure that the generated code is
  always valid XML (that's a very good design choice if I may say so).

  I havn't tried Pandoc, which was also mentioned by John MacFarlane.



Thanks for the summary.
For completeness, Maruku's output is:

pre class='markdown-html-error'HTML parse error:
lt;script lt;!--
alert(quot;Hello world!quot;)
lt;/script lt;gt;/pre

You see, Maruku is used inside Jacques Distler's math-enabled branch
of Instiki [1] which outputs well-formed XHTML + MathML + SVG. You
can't really leave anything to chance. If there is only one error
somewhere, the document does not validate and therefore it does not
render.

Maruku's treatment of raw XML is that it requires it to be well-formed
XML, with some user-friendly exceptions inspired by HTML (user doesn't
have to close br,img, etc.).
If it isn't well formed,  it triggers an error (nicely displayed on
stderr, or intercepted by API). Parsing goes on, but for convenience
it outputs the error in the document (see above; can be hidden by
CSS).

Jacques also did some work on sanitizing the XHTML document, but this
logically happens after Maruku.

[1]: http://golem.ph.utexas.edu/instiki/show/HomePage

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
 Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: on the philosophical aspects of a specification

2008-03-06 Thread Andrea Censi
  Maybe what is needed is some kind of syntax checker to run the source
  through to point out to users where there are errors and/or confusing
  markup. This could be a separate function from markdown itself, like
  markdown-lint, or a separate output option of markdown. A separate
  function would keep the markdown parser smaller. A syntax checker would
  also help users identify what the problem is when they get unexpected
  results.

Maruku, which uses a parser, does warn[^1] the user if something
strange is read (unclosed */**, not valid XML, unclosed ![...], etc.).
Some users wrote me that they really liked such feature because it
helped them to write proper documents.


[^1]: via stderr for command-line maruku; via a callback when maruku
is used as a library.

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: on the philosophical aspects of a specification

2008-03-04 Thread Andrea Censi
  I think what is trying to be said here is that in creating the spec you
  can't lose  the original focus of what Markdown is all about. Users
  (such as myself) don't really care that much about how the html is
  generated (breaks and explicit paragraphing are the domain of the
  parser). What we care about is that the original intent of our written
  source is maintained. It is very easy when creating a formal spec to
  lose track of the original intent and thus the usefulness of the tool.
  If I need to track exactly how many spaces I am allowed to use at the
  beginning of the line for certain implied formatting (like lists) then I
  am losing focus from the content I am writing, which is the exact
  opposite of what Markdown was created for.

I don't understand this line of reasoning that already came up on the list.

As a user, don't you want that the same input correspond to the same
output using a different Markdown interpreter? For example, you
compose your blog post offline and preview it using Maruku, and then
you post it to your Movable Type blog that uses Markdown.pl. You
really want that the HTML generated is the same.

This is possible only if we agree on an unambiguous specification.

  If Markdown ends up diverging by creating too many rigid rules then
  users such as myself will just end up finding another tool.

Now, that a specification be unambiguous doesn't imply that the
rules are rigid from the point of view of the user. I think this
is the misunderstanding for many people; I hope we can get past it.

 My $.02 CDN ($.02014US :)

Oh, my opinion counts more (0.02 EUR =  $0.03 ).

No, wait, now I get paid in dollars  :-(

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: evolving the spec (was: forking Markdown.pl?)

2008-02-29 Thread Andrea Censi
On Fri, Feb 29, 2008 at 3:04 PM, Yuri Takhteyev [EMAIL PROTECTED] wrote:
 Since Joe called for procedural suggestion, here is what I think we should do:
  1. ...
 2. ...

Yuri's suggestion looks reasonable to me.

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: forking Markdown.pl?

2008-02-28 Thread Andrea Censi
  Hum, while it's difficult to spec Markdown because its author doesn't
  seem so much interested, I think creating a spec for Markdown Extra is
  possible. I could host it on my website, alongside PHP Markdown Extra,
  and I could change PHP Markdown Extra to fit that spec.

If you do write a spec for Markdown Extra, I'll make sure Maruku
conforms to it.

Anyway, a spec for Markdown Extra would contain a spec for Markdown as
well, wouldn't it?

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown RFC?

2008-02-18 Thread Andrea Censi
On Feb 18, 2008 2:31 PM, Petite Abeille [EMAIL PROTECTED] wrote:
 Has anyone considered writing a formal specification for Markdown?

Yes, it's called Markdown.pl g.

In a nutshell: given that Markdown.pl (and straight ports of it) do
processing using multiple passes of regex/replace, you cannot find a
syntax that captures Markdown.pl's behavior exactly.

In my own Maruku, which uses a parser, I still have to figure out all
the subtleties in handling nested lists. I kind of gave up, because I
did not see the point in emulating all border cases (and bugs) in
Markdown.pl.

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Benchmarks with TextMate's manual

2007-08-27 Thread Andrea Censi
On 8/27/07, Michel Fortin [EMAIL PROTECTED] wrote:
 The following benchmarks have been obtained using the TextMate manual
 as the input source:

   http://macromates.com/textmate/manual/source.tbz

...
 Now, the interesting part of the test: combining all the documents
 together and parsing them in one shot (352 Ko). With PHP Markdown it
 takes 29 seconds; with Markdown.pl 1.0.1 it takes 71 seconds. Beside
 the obvious speed difference between PHP Markdown and Markdown.pl
 (probably due to what I mentioned above), this test shows that
 neither PHP Markdown or Markdown.pl scale well for big documents.

Maruku takes 8 seconds for parsing (on my PowerBook G4 1.5GHz).
(please note that Ruby, per se, is much slower than Perl)

I guess that if you plot [time for parsing] versus [length of the
document], you get a curve which grows more than linearly for
Markdown.pl and PHP Markdown.

This is the same behaviour that I observed in Bluecloth (straight port
of Markdown.pl in Ruby) -- if I remember well, time was O(length^2).
By comparison, Maruku, and other real parsers, takes O(length).

At the time, I concluded that it was due to a naive implementation of
regexp substitution in Ruby. But I don't know much about regexps in
the end, and know even less about Perl and PHP, so I'll shut up and
ask you: what do you think this scaling problem is due to?

 I'll let you draw your own conclusions.

That we need a real grammar! and real parsers!

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown extensions

2007-07-06 Thread Andrea Censi

Richard Taytor [EMAIL PROTECTED] wrote:


### element attributes (the attribute list)

example: `{#id .class name=value}`


More or less like this:

http://maruku.rubyforge.org/proposal.html

Note that this is already implemented in Maruku.


### div


How about this:

http://maruku.rubyforge.org/div.html

I will implement it shortly.


### span
### alternative headings (two kinds)


I have no opinion on these two yet.

--
Andrea Censi
 Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Revisiting mime-types and file extensions

2007-06-21 Thread Andrea Censi

Excellent, thank you very much; using fragment identifiers for versions
works for me.  Andrea, would you be happy with
http://maruku.org/syntax
http://maruku.org/syntax#0.5
as profiles?


OK for me.

It's better with a final slash:

   http://maruku.org/syntax/#ver

so that it's easier to serve a document (rubyforge.org does not
support multiviews).


--
Andrea Censi
 Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: S5 slide show system

2007-02-04 Thread Andrea Censi
On 2/2/07, Daniel Winterstein [EMAIL PROTECTED] wrote:
 Has anyone tried using Markdown to generate S5 slide-shows? I think
 this would be a pretty neat system. I'm thinking a level-1 header
 could be the slideshow title, and level-2 headers could define
 individual slides.

 Any thoughts?

It's definitely on the TODO list for Maruku.


-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Proposal for meta-data (third revision)

2007-01-10 Thread Andrea Censi
Hello again!

This is the revised revised revised proposal:

http://maruku.rubyforge.org/proposal.md
http://maruku.rubyforge.org/proposal.html
http://maruku.rubyforge.org/proposal.pdf

The main change was to use an opening string of brace+colon {: to
not lock-up the precious { forever, so that in the future one could
think of using the braces also for other purposes.

Changes were:

*   Changed the syntax for compatibility with a future extension mechanism.

The first character in the curly braces must be a colon, optionally
followed by a space:

{: ref .class #id}

The old syntax was `{ref .class #id}`.

For ALDs, the new syntax is:

{:ref_id: key=val .class #id }

instead of:

{ref_id}: key=val .class #id

Converters that don't use this syntax may just ignore everything
which is in curly braces and starts with :.

For regexp-based interpreters, this is the regular expression to
get rid of this stuff: `/\{:(\\\}|[^\}])*\}/`. Just do a
`gsub` with the empty
string, and you are done.

*   IAL can be put both *before* and *after* the element.
There is no ambiguity as a blank line is needed between elements:

Paragraph 1

{:par2}
Paragraph 2

is equivalent to:

Paragraph 1

Paragraph 2
{:par2}

*   Simplified rules for escaping.


-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Revised 2005 proposal for meta-data

2007-01-01 Thread Andrea Censi
On 1/1/07, Ian Barland [EMAIL PROTECTED] wrote:
 FWIW, you can simplify this slightly by getting rid of the might be
 escaped list -- just decree *any* (punctuation) character might be
 escaped (using a backslash)[^1].

OK

 Almost for free, this lets people quote a
 space (\  would be marked down to nbsp;), as well as quote a newline: a
 backslash at the end of a line would translate naturally to br/.

 This rule simpler for both markdown-users and markdown-implementers.

After an initial rejection[^1], I agree on both of these. In
particular, as an indicator of a linebreak, it would be better than
the 2 spaces, because it provides the user with visual feedback.

[^1] a \ at the end of the line makes me think of the exact opposite
of a linebreak (in C, for example, the \ at the end of the line joins
the line with the next).

 [1] Even further, you could allow non-punctuation to be escaped.

In a sense, this is the most consinstent way of escaping.

If the rule holds for every context in the document, than the
algorithm for interpreting the document is very very simple:
1 - first pass: substitute every escaped sequence with placeholders
representing the literal
2 - do regexp/parsing ignoring the escapes
3 - substitute the placeholders

 Though it
 might surprise users who write a back\slash only to have markdown seem to
 mysteriously erase that character.

I think this is not so common. If you want to talk about backslashes,
you talk about code, and you probably will be using `\`.

The summary of all this discussion is:
1) Everywhere all characters can be escaped (except in code blocks)
  a)  \  represents a non-breaking space
  b)  \newline represents a linebreak
2) Inside quoted values, you MUST escape ``
3) Inside 'quoted values', you MUST escape `'`

I would tend to drop the special case
 [text](url titlewithquotes)
as it is ambiguous.

The first pass of processing the document simply becomes:

until eof
   c = getc
   if c == '\'
   push literal(getc)
   else if c == backtick `
   count the number of backticks
   possibly, eat one space
   threat as literals everything until closing backtics
   else
  push literal(getc)
  end
   end

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Revised - Revised 2005 proposal for meta-data

2007-01-01 Thread Andrea Censi
Happy new year!

This is the revised revised proposal:

http://maruku.rubyforge.org/proposal.md
http://maruku.rubyforge.org/proposal.html
http://maruku.rubyforge.org/proposal.pdf

I wait for comments.

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Leading blank lines in codeblocks ignored?

2006-12-31 Thread Andrea Censi
On 12/31/06, John Gruber [EMAIL PROTECTED] wrote:
 Andrea Censi [EMAIL PROTECTED] wrote on 12/29/06 at 10:49 PM:

  Markdown.pl ignores the leading blank line in the code block.
  Is this intended behaviour?

 Yes.

Is there any way in Markdown to indicate a code-block with a leading blank line?

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Escaping inside code blocks?

2006-12-31 Thread Andrea Censi
On 12/31/06, John Gruber [EMAIL PROTECTED] wrote:
 Unless I'm forgetting something, the documentation is wrong. Or,
 more specifically, it is outdated. The idea is that there are no
 escapes in code spans. Just like with code blocks, the contents
 are treated literally. That means the only character you have to
 worry about escaping is '`' itself, and instead of escaping it
 with a backslash or something, the rule is just that you increase
 the number of backticks used as the code span delimiters such that
 if the contents of the code span contains N consecutive backticks,
 you use N+1 backticks to delimit the span.


  Question 2:
  What is the Markdown syntax for representing:
  1) an inline code span whose string is ` (only a backtick)

 `` ` ``

So the spaces around the single ` disappear?

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Revised 2005 proposal for meta-data

2006-12-31 Thread Andrea Censi
On 12/31/06, Michel Fortin [EMAIL PROTECTED] wrote:
 Le 2006-12-31 à 5:01, Andrea Censi a écrit :

  Ideally the list of characters that MIGHT be escaped should be the
  same in every part of the document, while some characters MUST be
  escaped in certain parts.

 Well, that's what I had in mind too.


Unfortunately, there is an exception to be done for backward compatibility:

[alt text](/url/ Title with  quotes  inside)



-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Revised 2005 proposal for meta-data

2006-12-31 Thread Andrea Censi
  Unfortunately, there is an exception to be done for backward
  compatibility:
 
 [alt text](/url/ Title with  quotes  inside)

 Unless there's a misunderstanding somewhere, this is not an exception
 at all: you MIGHT escape the quotes in the title if you want, it's
 only that you don't really have to.

I was thinking that: in the quotes you MUST escape the , and you MAY
escape the others.

 A side effect of this is that there's no way to include the string )
 within a title attribute inside an inline-style link, nor can you add
 some space between the quote and the closing parenthesis to avoid the
 problem.

Exactly.

So, in the interest of clarity, here's the core problem:

If one allows unescaped  in quoted values, this causes ambiguities:

 [alt text](/url/ Title with ) quote and parens inside )

there are 2 ways to interpret this fragment. Such things should not happen.

Or consider also:

 [alt text](/url/ Title with )  [alt text](/url/ quote and
parens inside )

how to interpret this? The grammar is ambiguous.
I don't know much about parsing, but can you actually build a parser
for this grammar? (any CS person out there?)

IMHO it was not a good idea to allow such construct.
The standard pattern in many languages is to allow single and double
quotes, so if you have a title with many single quotes, you use the
double quotes, and viceversa:

 bah 'bah' bah =  bah \'bah\' bah = 'bah \'bah\' bah'
 'bah bah bah' =  'bah \bah\ bah' = bah \bah\ bah

This should be enough for all needs.

p.s.

Happy new year!

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Escaping inside code blocks?

2006-12-30 Thread Andrea Censi
I am doing unit-tests for Maruku and every once in a while I run into
some doubts.
I am posting a lot to the list, but all of these messages should be
in-topic (tell me if not).

Consider the input:
---
`There is a literal backtick (\`) here.`

`There is a literal backtick (\\`) here.`

``There is a literal backtick (`) here.``
---

The documentation says that line 2 and 3 are equivalent.
(http://maruku.rubyforge.org/markdown_syntax.html#code)

But this is Markdown.pl's result:
---
pcodeThere is a literal backtick (\/code) here.`/p

pcodeThere is a literal backtick (\\/code) here.`/p

pcodeThere is a literal backtick (`) here./code/p
---

Question 1:
How do you do escaping in code blocks in your implementation?

Question 2:
How should I do escaping in my implementation?

Question 2:
What is the Markdown syntax for representing:
1) an inline code span whose string is ` (only a backtick)
2) an inline code span whose string is \ (only a backslash)
?

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Doubt about standard syntax

2006-12-29 Thread Andrea Censi
I have a doubt about the standard syntax (actually, it's the only test
that maruku doesn't pass yet).

Lists MUST be preceded by an empty line?

So the following are only 4 paragraphs, without list items, right?

---
Paragraph and no space:
* ciao

Paragraph and 1 space:
 * ciao

Paragraph and 3 spaces:
   * ciao

Paragraph and 4 spaces:
* ciao
---

In other words, a paragraph, once started, eats everything until a blank line?

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Doubt about standard syntax

2006-12-29 Thread Andrea Censi
On 12/29/06, Robert Ullrey [EMAIL PROTECTED] wrote:
 This is true, but I find that you can override the paragraph gobble by adding 
 three spaces after a line.

Are you talking about a specific implementation, or the syntax in general?
Which implementation?


-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Maruku: a better Markdown interpreter for Ruby.

2006-12-28 Thread Andrea Censi
On 12/28/06, John Gruber [EMAIL PROTECTED] wrote:
 Andrea Censi [EMAIL PROTECTED] wrote on 12/27/06 at 7:11 PM:

 In particular, what do you think of this (proposed) syntax for adding
 meta-data to span-level elements?
 
 http://maruku.rubyforge.org/maruku.html#future

 8.1. A syntax for specifying meta-data for span-level elements

 Your use of braces here is very likely to conflict with future
 extensions to Markdown itself.

About this, Michel Fortin referred to an old thread (2005) about
meta-data syntax.
I resurrected it and tried to summarize:

http://maruku.rubyforge.org/markdown_extra2.html
http://maruku.rubyforge.org/markdown_extra2.md

Any comment after so long time?

 8.2. Comments.

 Why not just use HTML comments?

For one thing, if I have to write a one-line comment:

!-- Please, Mark, have a look at the following list --

I need no less than 7 characters. Practically every language except
xml allows a
delimiter comment newline
syntax.

For hiding a lot of text, I concede that the !-- -- syntax is
sufficient, but is really overkill for short comments

-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Maruku: a better Markdown interpreter for Ruby.

2006-12-27 Thread Andrea Censi
Hello to all!

Maruku is a Markdown interpreter written in Ruby. It is released under the GPL.

Maruku implements the original Markdown syntax and all the
improvements in PHP Markdown Extra. Moreover, it implements some ideas
from MultiMarkdown, and adds a syntax for specifying metadata for
block elements.

Unlike Bluecloth, Maruku creates an in-memory representation of the
document tree, and this makes it very easy to export to other formats.

Out of the box, Maruku offers export to HTML and to Latex/PDF.
There is syntax highlighting for code blocks via the `syntax` library
for HTML, and via the `listings` package for Latex.

Here there are some examples:

http://maruku.rubyforge.org/maruku.md
http://maruku.rubyforge.org/maruku.html
http://maruku.rubyforge.org/maruku.pdf

http://maruku.rubyforge.org/markdown_syntax.md
http://maruku.rubyforge.org/markdown_syntax.html
http://maruku.rubyforge.org/markdown_syntax.pdf

Download instructions at
  http://maruku.rubyforge.org/maruku.html#download

In general it should suffice to do:

$ gem install maruku

This is my first time to release a gem, so let me know of any problem
you encounter while installing.

Try it with
$ maruku file.md   #  converts to html
$ marutex file.md   #  converts to tex and invokes pdflatex

Any feedback is appreciated.

In particular, what do you think of this (proposed) syntax for adding
meta-data to span-level elements?

http://maruku.rubyforge.org/maruku.html#future


Have a nice day!
-- 
Andrea Censi
  Life is too important to be taken seriously (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss