docs/proposal.html in maruku-0.2.13 vs docs/proposal.html in maruku-0.3.0
- old
+ new
@@ -1,90 +1,397 @@
-<?xml version='1.0' ?>
+<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>Syntax for meta-data</title><link href='style.css' rel='stylesheet' type='text/css' /></head><head><title>Syntax for meta-data</title><link href='style.css' rel='stylesheet' type='text/css' /></head><body><h1 id='syntax_for_metadata'>Syntax for meta-data</h1><p>This document describe a syntax that makes it possible to attach meta-data to block-level elements (headers, paragraphs, code blocks, ...), and to span-level elements (links, images, ...).</p><p>Last update: December 29th, 2006.</p><p><em>Table of contents:</em></p><blockquote><div class='maruku_toc'><ul style='list-style: none;'><li><span class='maruku_section_number'>1. </span><a href='#attribute_lists'>Attribute lists</a><ul style='list-style: none;'><li><span class='maruku_section_number'>1.1. </span><a href='#class_id'><tt style='background-color: #f0f0e0;'>id</tt> and <tt style='background-color: #f0f0e0;'>class</tt> are special</a></li></ul></li><li><span class='maruku_section_number'>2. </span><a href='#where_to_put_attribute_lists'>Where to put attribute lists</a><ul style='list-style: none;'><li><span class='maruku_section_number'>2.1. </span><a href='#for_blocklevel_elements'>For block-level elements</a></li><li><span class='maruku_section_number'>2.2. </span><a href='#for_headers'>For headers</a></li><li><span class='maruku_section_number'>2.3. </span><a href='#for_spanlevel_elements'>For span-level elements</a></li></ul></li><li><span class='maruku_section_number'>3. </span><a href='#using_tags'>Using "tags"</a></li><li><span class='maruku_section_number'>4. </span><a href='#additional_examples_and_cornercases'>Additional examples and corner-cases</a><ul style='list-style: none;'><li><span class='maruku_section_number'>4.1. </span><a href='#code_blocks'>Code blocks</a></li></ul></li><li><span class='maruku_section_number'>5. </span><a href='#grammar'>Formal grammar</a><ul style='list-style: none;'><li><span class='maruku_section_number'>5.1. </span><a href='#summary'>Summary</a></li></ul></li><li><span class='maruku_section_number'>6. </span><a href='#things_to_discuss'>Things to discuss</a></li></ul></div></blockquote><h2 id='attribute_lists'><span class='maruku_section_number'>1. </span>Attribute lists</h2><p>This is an example attribute list, which shows everything you can put inside:</p><pre style='background-color: #f0f0e0;'>{key1=val key2="long val" #myid .class1 .class2 tag1 tag2}
-</pre><p>More in particular, an attribute list is a brace-enclosed, whitespace-separated list of elements of 4 different kinds:</p><ol><li>key/value pairs</li><li><a href='#using_tags'>tags</a> (<tt style='background-color: #f0f0e0;'>tag1</tt>,<tt style='background-color: #f0f0e0;'>tag2</tt>)</li><li><a href='#class_id'>id specifiers</a> (<tt style='background-color: #f0f0e0;'>#myid</tt>)</li><li><a href='#class_id'>class specifiers</a> (<tt style='background-color: #f0f0e0;'>.myclass</tt>)</li></ol><p>The formal grammar is specified <a href='#grammar'>below</a>.</p><h3 id='class_id'><span class='maruku_section_number'>1.1. </span><tt style='background-color: #f0f0e0;'>id</tt> and <tt style='background-color: #f0f0e0;'>class</tt> are special</h3><p>You can attach every attribute you want to elements, but some are threated in a special way:</p><ul><li><p><tt style='background-color: #f0f0e0;'>id</tt>: you can only have one ID specified for an element. ID must not conflict with one another.</p></li><li><p><tt style='background-color: #f0f0e0;'>class</tt>: class attributes are cumulative. It is possible to attach more that one class attribute to the same element (just like HTML).</p><p>In this case, the values get merged. So these are equivalent:</p><pre style='background-color: #f0f0e0;'>{.class1 .class2}
-{class="class1 class2"}</pre></li></ul><p>For ID and classes there are special shortcuts:</p><ul><li><tt style='background-color: #f0f0e0;'>#myid</tt> is a shortcut for <tt style='background-color: #f0f0e0;'>id=myid</tt></li><li><tt style='background-color: #f0f0e0;'>.myclass</tt> is a shortcut for <tt style='background-color: #f0f0e0;'>class=myclass</tt></li></ul><p>Therefore the following attribute lists are equivalent:</p><pre style='background-color: #f0f0e0;'>{#myid .class1 .class2}
-{id=myid class=class1 class=class2}
+<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>Proposal for adding a meta-data syntax to Markdown</title>
+
+<link href='style.css' rel='stylesheet' type='text/css' />
+</head>
+<body>
+<h1 id='proposal_for_adding_a_metadata_syntax_to_markdown'>Proposal for adding a meta-data syntax to Markdown</h1>
+
+<p>This document describes a syntax for attaching meta-data to block-level elements (headers, paragraphs, code blocks,…), and to span-level elements (links, images,…).</p>
+
+<p>Last updated <strong>January 2nd, 2007</strong>: integrated topics discussed in mailing list.</p>
+
+<p><em>Table of contents:</em></p>
+
+<blockquote>
+<div class='maruku_toc'>
+<ul style='list-style: none;'>
+<li><span class='maruku_section_number'>1. </span><a href='#overview'>Overview</a></li>
+
+<li><span class='maruku_section_number'>2. </span><a href='#attribute_lists'>Attribute lists</a>
+<ul style='list-style: none;'>
+<li><span class='maruku_section_number'>2.1. </span><a href='#class_id'><code>id</code> and <code>class</code> are special</a></li>
+</ul>
+</li>
+
+<li><span class='maruku_section_number'>3. </span><a href='#where_to_put_inline_attribute_lists'>Where to put inline attribute lists</a>
+<ul style='list-style: none;'>
+<li><span class='maruku_section_number'>3.1. </span><a href='#for_blocklevel_elements'>For block-level elements</a></li>
+
+<li><span class='maruku_section_number'>3.2. </span><a href='#for_headers'>For headers</a></li>
+
+<li><span class='maruku_section_number'>3.3. </span><a href='#for_spanlevel_elements'>For span-level elements</a></li>
+</ul>
+</li>
+
+<li><span class='maruku_section_number'>4. </span><a href='#using_tags'>Using attributes lists definition</a></li>
+
+<li><span class='maruku_section_number'>5. </span><a href='#grammar'>The rules</a>
+<ul style='list-style: none;'>
+<li><span class='maruku_section_number'>5.1. </span><a href='#the_issue_of_escaping'>The issue of escaping</a></li>
+
+<li><span class='maruku_section_number'>5.2. </span><a href='#syntax_for_attribute_lists'>Syntax for attribute lists</a></li>
+</ul>
+</li>
+
+<li><span class='maruku_section_number'>6. </span><a href='#things_to_discuss'>Things to discuss</a></li>
+
+<li><span class='maruku_section_number'>7. </span><a href='#design_rationale'>Design rationale</a></li>
+</ul>
+</div>
+</blockquote>
+
+<h2 id='overview'><span class='maruku_section_number'>1. </span>Overview</h2>
+
+<p>This proposal describes two additions to the Markdown syntax:</p>
+
+<ol>
+<li>
+<p>inline attribute lists (IAL)</p>
+
+<pre><code>## Header ## {key=val .class #id ref_id}</code></pre>
+</li>
+
+<li>
+<p>attribute lists definitions (ALD)</p>
+
+<pre><code>{ref_id}: key=val .class #id</code></pre>
+</li>
+</ol>
+
+<p>Every span-level or block-level element can be followed by an IAL:</p>
+
+<pre><code>### Header ### {#header1 class=c1}
+
+Paragraph *with emphasis*{class=c1}
+second line of paragraph
+{class=c1}
+</code></pre>
+
+<p>In this example, the three IALs refer to the header, the emphasis span, and the entire paragraph, respectively.</p>
+
+<p>IALs can reference ALDs. The result of the following example is the same as the previous one:</p>
+
+<pre><code>### Header ### {#header1 c1}
+
+Paragraph *with emphasis*{c1}
+second line of paragraph
+{c1}
+
+{c1}: class=c1
+</code></pre>
+
+<h2 id='attribute_lists'><span class='maruku_section_number'>2. </span>Attribute lists</h2>
+
+<p>This is an example attribute list, which shows everything you can put inside:</p>
+
+<pre><code>key1=val key2="long val" #myid .class1 .class2 ref1 ref2
+</code></pre>
+
+<p>More in particular, an attribute list is a whitespace-separated list of elements of 4 different kinds:</p>
+
+<ol>
+<li>key/value pairs (quoted if necessary)</li>
+
+<li><a href='#using_tags'>references to ALD</a> (<code>ref1</code>,<code>ref2</code>)</li>
+
+<li><a href='#class_id'>id specifiers</a> (<code>#myid</code>)</li>
+
+<li><a href='#class_id'>class specifiers</a> (<code>.myclass</code>) </li>
+</ol>
+
+<h3 id='class_id'><span class='maruku_section_number'>2.1. </span><code>id</code> and <code>class</code> are special</h3>
+
+<p>For ID and classes there are special shortcuts:</p>
+
+<ul>
+<li>
+<p><code>#myid</code> is a shortcut for <code>id=myid</code></p>
+</li>
+
+<li>
+<p><code>.myclass</code> means "add <code>myclass</code> to the current <code>class</code> attribute".</p>
+
+<p>So these are equivalent:</p>
+
+<pre><code>{.class1 .class2}
+{class="class1 class2"}</code></pre>
+</li>
+</ul>
+
+<p>The following attribute lists are equivalent:</p>
+
+<pre><code>{#myid .class1 .class2}
+{id=myid class=class1 .class2}
{id=myid class="class1 class2"}
+{id=myid class="will be overridden" class=class1 .class2}
+</code></pre>
-</pre><h2 id='where_to_put_attribute_lists'><span class='maruku_section_number'>2. </span>Where to put attribute lists</h2><h3 id='for_blocklevel_elements'><span class='maruku_section_number'>2.1. </span>For block-level elements</h3><p>For paragraphs and other block-level elements, attributes lists go <strong>after</strong> the element:</p><pre style='background-color: #f0f0e0;'>This is a paragraph.
+<h2 id='where_to_put_inline_attribute_lists'><span class='maruku_section_number'>3. </span>Where to put inline attribute lists</h2>
+
+<h3 id='for_blocklevel_elements'><span class='maruku_section_number'>3.1. </span>For block-level elements</h3>
+
+<p>For paragraphs and other block-level elements, IAL go <strong>after</strong> the element:</p>
+
+<pre><code>This is a paragraph.
Line 2 of the paragraph.
{#myid .myclass}
A quote with a citation url:
> Who said that?
{cite=google.com}
-</pre><p>Note: empty lines between the block and the attributes list are not tollerated. So this is not legal:</p><pre style='background-color: #f0f0e0;'>This is a paragraph.
+</code></pre>
+
+<p>Note: empty lines between the block and the IAL are not tollerated. So this is not legal:</p>
+
+<pre><code>This is a paragraph.
Line 2 of the paragraph.
{#myid .myclass}
-</pre><p>Attribute lists may be indented up to 3 spaces:</p><pre style='background-color: #f0f0e0;'>Paragraph1
+</code></pre>
+
+<p>Attribute lists may be indented up to 3 spaces:</p>
+
+<pre><code>Paragraph1
¬{ok}
Paragraph2
¬¬{ok}
Paragraph2
¬¬¬{ok}
-</pre><h3 id='for_headers'><span class='maruku_section_number'>2.2. </span>For headers</h3><p>For headers, you can put attribute lists on the same line:</p><pre style='background-color: #f0f0e0;'>### Header ### {#myid}
+</code></pre>
+<h3 id='for_headers'><span class='maruku_section_number'>3.2. </span>For headers</h3>
+
+<p>For headers, you can put attribute lists on the same line:</p>
+
+<pre><code>### Header ### {#myid}
+
Header {#myid .myclass}
------
-</pre><p>or, as other block-level elements, on the line after:</p><pre style='background-color: #f0f0e0;'>### Header ###
+</code></pre>
+
+<p>or, as like other block-level elements, on the line below:</p>
+
+<pre><code>### Header ###
{#myid}
Header
------
{#myid .myclass}
-</pre><h3 id='for_spanlevel_elements'><span class='maruku_section_number'>2.3. </span>For span-level elements</h3><p>For span-level elements, metadata goes immediately <strong>after</strong> in the paragraph flow.</p><p>For example, in this:</p><pre style='background-color: #f0f0e0;'>This is a *chunky paragraph*{#id1}.
-{#id2}</pre><p>the ID of the <tt style='background-color: #f0f0e0;'>em</tt> element is set to <tt style='background-color: #f0f0e0;'>id1</tt> and the id of the paragraph is set to <tt style='background-color: #f0f0e0;'>id2</tt>.</p><p>This works also for links, like this:</p><pre style='background-color: #f0f0e0;'>This is [a link][ref]{#myid rel=abc rev=abc}
-</pre><p>For images, this:</p><pre style='background-color: #f0f0e0;'>This is ![Alt text](url "fresh carrots")
-</pre><p>is equivalent to:</p><pre style='background-color: #f0f0e0;'>This is ![Alt text](url){title="fresh carrots"}
-</pre><h2 id='using_tags'><span class='maruku_section_number'>3. </span>Using "tags"</h2><p>In an attribute list, you can have:</p><ol><li><tt style='background-color: #f0f0e0;'>key=value</tt> pairs,</li><li>id attributes (<tt style='background-color: #f0f0e0;'>#myid</tt>)</li><li>class attributes (<tt style='background-color: #f0f0e0;'>.myclass</tt>)</li></ol><p>Everything else is interpreted as a "tag" <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup>. Tags let you tag an element and then specify the attributes later:</p><pre style='background-color: #f0f0e0;'># Header # {tag}
+</code></pre>
+<h3 id='for_spanlevel_elements'><span class='maruku_section_number'>3.3. </span>For span-level elements</h3>
+
+<p>For span-level elements, meta-data goes immediately <strong>after</strong> in the flow.</p>
+
+<p>For example, in this:</p>
+
+<pre><code>This is a *chunky paragraph*{#id1}
+{#id2}</code></pre>
+
+<p>the ID of the <code>em</code> element is set to <code>id1</code> and the ID of the paragraph is set to <code>id2</code>.</p>
+
+<p>This works also for links, like this:</p>
+
+<pre><code>This is [a link][ref]{#myid rel=abc rev=abc}
+</code></pre>
+
+<p>For images, this:</p>
+
+<pre><code>This is ![Alt text](url "fresh carrots")
+</code></pre>
+
+<p>is equivalent to:</p>
+
+<pre><code>This is ![Alt text](url){title="fresh carrots"}
+</code></pre>
+
+<h2 id='using_tags'><span class='maruku_section_number'>4. </span>Using attributes lists definition</h2>
+
+<p>In an attribute list, you can have: </p>
+
+<ol>
+<li><code>key=value</code> pairs,</li>
+
+<li>id attributes (<code>#myid</code>)</li>
+
+<li>class attributes (<code>.myclass</code>) </li>
+</ol>
+
+<p>Everything else is interpreted as a reference to an ALD.</p>
+
+<pre><code># Header # {ref}
+
Blah blah blah.
-{tag}: #myhead .myclass lang=fr
-</pre><p>Tags are not unique: more than one element can be assigned the same tag.</p><pre style='background-color: #f0f0e0;'># Header 1 # {tag}
-...
-# Header 2 # {tag}
+{ref}: #myhead .myclass lang=fr
+</code></pre>
-{tag}: .myclass lang=fr
-</pre><p>In this case, however, you should not assign the <tt style='background-color: #f0f0e0;'>id</tt> attribute. So this is <strong>not</strong> valid:</p><pre style='background-color: #f0f0e0;'># Header 1 # {tag}
+<p>Of course, more than one IAL can reference the same ALD:</p>
+
+<pre><code># Header 1 # {1}
...
-# Header 2 # {tag}
+# Header 2 # {1}
-{tag}: #myid .myclass lang=fr
+{1}: .myclass lang=fr
-</pre><p>Of course, tags are valid for both block-level and span-level elements:</p><pre style='background-color: #f0f0e0;'>### My header ### {1}
-This is a paragraph with an *emphasis*{2}
-a and the paragraph goes on.
-{3}
+</code></pre>
-{1}: #header_id
-{2}: #emph_id
-{3}: #par_id
+<h2 id='grammar'><span class='maruku_section_number'>5. </span>The rules</h2>
-</pre><h2 id='additional_examples_and_cornercases'><span class='maruku_section_number'>4. </span>Additional examples and corner-cases</h2><h3 id='code_blocks'><span class='maruku_section_number'>4.1. </span>Code blocks</h3><p>Note that attributes for code blocks should not be indented by more than 3 spaces:</p><pre style='background-color: #f0f0e0;'>¬¬¬¬This¬is¬a¬code¬block.
-¬¬¬¬{#myid}¬<--¬this¬is¬part¬of¬the¬block
-¬¬¬{#blockid}
+<h3 id='the_issue_of_escaping'><span class='maruku_section_number'>5.1. </span>The issue of escaping</h3>
-</pre><h2 id='grammar'><span class='maruku_section_number'>5. </span>Formal grammar</h2><p>In this section we define the formal grammar AKA the big regexp.</p><p>In the spirit of HTML:</p><blockquote><p>Identifiers must begin with a letter (<tt style='background-color: #f0f0e0;'>[A-Za-z]</tt>) and may be followed by any number of letters, digits (<tt style='background-color: #f0f0e0;'>[0-9]</tt>), hyphens (<tt style='background-color: #f0f0e0;'>-</tt>), underscores (<tt style='background-color: #f0f0e0;'>_</tt>), colons (<tt style='background-color: #f0f0e0;'>:</tt>), and periods (<tt style='background-color: #f0f0e0;'>.</tt>).</p></blockquote><p>the same applies to class attributes and for the keys in key/value pairs. Moreover, they are case-sensitive.</p><p>So this is a valid attribute list:</p><pre style='background-color: #f0f0e0;'>{#my:_A123.veryspecialID .my:____:class }
-</pre><p>The regexp for identifiers is therefore</p><pre style='background-color: #f0f0e0;'>Identifier = [A-Za-z][A-Za-z0-9_\.\:\-]*
-</pre><p>(This is Ruby syntax; I am told it is similar to Perl's so I guess it is generally understandable. If not, please tell me the equivalent in your language.)</p><p>Now:</p><ul><li><p>an id attribute is an <tt style='background-color: #f0f0e0;'>Identifier</tt> preceded by <tt style='background-color: #f0f0e0;'>#</tt></p></li><li><p>a class attribute is an <tt style='background-color: #f0f0e0;'>Identifier</tt> preceded by <tt style='background-color: #f0f0e0;'>.</tt></p></li><li><p>a <tt style='background-color: #f0f0e0;'>Tag</tt> is an <tt style='background-color: #f0f0e0;'>Identifier</tt></p></li><li><p>A key/value pair is an Identifier, followed by a <tt style='background-color: #f0f0e0;'>=</tt>, followed by a value.</p><p>The value can be quoted (<tt style='background-color: #f0f0e0;'>key="Very long quote"</tt>) or unquoted (<tt style='background-color: #f0f0e0;'>key=small_value</tt>).</p><ul><li><p>An unquoted value must not start with a double quote <tt style='background-color: #f0f0e0;'>"</tt>, and may contain everything except whitespace:</p><pre style='background-color: #f0f0e0;'>UnquotedValue = [^\s\"][^\s]*
-</pre><p>Example:</p><pre style='background-color: #f0f0e0;'>{key1=This=is"myValue_%&$&d9i key2=true}</pre></li><li><p>A quoted value is enclosed in double quotes and may contain every char. In a quoted value there are two escaping rules:</p><ol><li>The sequence <tt style='background-color: #f0f0e0;'> \\ </tt> is replaced by <tt style='background-color: #f0f0e0;'> \ </tt></li><li>The sequence <tt style='background-color: #f0f0e0;'>\"</tt> is replaced by <tt style='background-color: #f0f0e0;'>"</tt></li></ol><p>this makes it possible to include both <tt style='background-color: #f0f0e0;'>"</tt> and `` in the strings.</p><pre style='background-color: #f0f0e0;'>{key1="\\\" backslash and quote also a tab"}</pre></li></ul></li></ul><h3 id='summary'><span class='maruku_section_number'>5.1. </span>Summary</h3><p>To summarize:</p><pre style='background-color: #f0f0e0;'>AttributeList = \{ (ws [KeyValue|IdSpec|ClassSpec|Tag])* ws \}
-Identifier = [A-Za-z][A-Za-z0-9_\.\:\-]*
-Tag = Identifier
-IdSpec = #Identifier
-ClassSpec = .Identifier
-KeyValue = Key=[QuotedValue|UnquotedValue]
-Key = Identifier
-UnquotedValue = [^\s\"][^\s]*
-QuotedValue = \"[^\"]*\" <---------- note: simplistic
-</pre><p><strong>Note</strong>: I am not able to write the regexp for <tt style='background-color: #f0f0e0;'>QuotedValue</tt> that takes into account also the escaping of the characters. Any regexp wizard out there?</p><h2 id='things_to_discuss'><span class='maruku_section_number'>6. </span>Things to discuss</h2><ul><li><p>Question: should we allow whitespace at the sides of <tt style='background-color: #f0f0e0;'>=</tt> in key/value pairs?</p></li><li><p>Question: should <tt style='background-color: #f0f0e0;'>:</tt> be a synonym for <tt style='background-color: #f0f0e0;'>=</tt> in attributes list.</p><p>Personally, I like this:</p><pre style='background-color: #f0f0e0;'>{key1: value key2: "value2 with spaces" }
-</pre><p>much more than this:</p><pre style='background-color: #f0f0e0;'>{key1=value key2="value2 with spaces " }</pre></li><li><p>A syntax for creating <tt style='background-color: #f0f0e0;'>SPAN</tt> elements in the paragraphs and setting their attributes.</p><p>This is my proposal:</p><pre style='background-color: #f0f0e0;'>a long paragraph with {special words}{#myspan} that I want to
+<ol>
+<li>
+<p>No escaping in code blocks.</p>
+
+<ul>
+<li><code>`\`</code> represents the one-character string <code>\</code>.</li>
+</ul>
+</li>
+
+<li>
+<p>Everywhere else, <strong>all</strong> characters <strong>can</strong> be escaped:</p>
+
+<ul>
+<li><code>\|</code> is the literal <code>|</code>, <code>\n</code> is the literal <code>n</code>.</li>
+
+<li><code>\ </code> represents a non-breaking space.</li>
+
+<li><code>\</code> followed by a newline represents a linebreak.</li>
+</ul>
+</li>
+
+<li>
+<p>Quotes <strong>must</strong> be escaped inside quoted values:</p>
+
+<ul>
+<li>
+<p>Inside <code>"quoted values"</code>, you <strong>must</strong> escape <code>"</code>.</p>
+</li>
+
+<li>
+<p>Inside <code>'quoted values'</code>, you <strong>must</strong> escape <code>'</code>.</p>
+</li>
+
+<li>
+<p>Other examples:</p>
+
+<p><code>"bah 'bah' bah"</code> = <code>"bah \'bah\' bah"</code> = <code>'bah \'bah\' bah'</code></p>
+
+<p><code>'bah "bah" bah'</code> = <code>'bah \"bah\" bah'</code> = <code>"bah \"bah\" bah"</code></p>
+</li>
+</ul>
+</li>
+
+<li>
+<p>There is an exception for backward compatibility: </p>
+
+<pre><code>[text](url "title"with"quotes")</code></pre>
+</li>
+</ol>
+
+<h3 id='syntax_for_attribute_lists'><span class='maruku_section_number'>5.2. </span>Syntax for attribute lists</h3>
+
+<p>Consider the following attribute list:</p>
+
+<pre><code>{key=value ref key2="quoted value" }</code></pre>
+
+<p>In this string, <code>key</code>, <code>value</code>, and <code>ref</code> can be substituted by any string that does not contain whitespace, or the unescaped characters <code>}</code>,<code>=</code>,<code>'</code>,<code>"</code>.</p>
+
+<p>Inside a quoted value, you <strong>may</strong> use <code>}</code>,<code>=</code> unescaped but you <strong>must</strong> escape the other kind of quote.</p>
+
+<h2 id='things_to_discuss'><span class='maruku_section_number'>6. </span>Things to discuss</h2>
+
+<ul>
+<li>
+<p>A syntax for creating <code>SPAN</code> elements in the paragraphs and setting their attributes.</p>
+
+<p>This is my proposal:</p>
+
+<pre><code>a long paragraph with [special words]{#myspan} that I want to
highlight
-</pre><p>should originate the following HTML:</p><pre style='background-color: #f0f0e0;'><p>a long paragraph with <span id="myspan">special words</span>
+</code></pre>
+
+<p>should originate the following HTML:</p>
+
+<pre><code><p>a long paragraph with <span id="myspan">special words</span>
that I want to highlight</p>
-</pre><p>This is Michel's comment on this syntax:</p><blockquote><p>It looks quite good. One question is can it be amgibuous with braces used for the attributes themselves? I don't have an answer to that question; better ask this on the list.</p></blockquote><p>I don't think it is ambiguous, because it's the only case in which you have the sequence <tt style='background-color: #f0f0e0;'>}{</tt>:</p><pre style='background-color: #f0f0e0;'>{.*}{Attributes}
-</pre><blockquote><p>Another question: does it makes sense to define <tt style='background-color: #f0f0e0;'><span></tt> within Markdown when you can't have <tt style='background-color: #f0f0e0;'><b></tt> and <tt style='background-color: #f0f0e0;'><i></tt>, or the more meaningful <tt style='background-color: #f0f0e0;'><cite></tt>, <tt style='background-color: #f0f0e0;'><q></tt>, <tt style='background-color: #f0f0e0;'><dfn></tt>, and <tt style='background-color: #f0f0e0;'><var></tt>? We have to draw the line somewhere, where should it be? Another good question for the list.</p></blockquote></li><li><p>anything else?</p></li></ul><div class='footnotes'><hr /><ol><li id='fn:1'><p>a better name for this?<a href='#fnref:1' rev='footnote'>↩</a></p></li></ol></div><div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown interpreter'>Maruku</a> at 17:00 on Friday, December 29th, 2006.</span></div></body></html>
+</code></pre>
+
+<p><strong><em>Note: I changed the old <code>{special words}{#myspan}</code> with <code>[special words]{#myspan}</code> which is less ambiguous.</em></strong></p>
+</li>
+
+<li>
+<blockquote>
+<p>Another question: does it makes sense to define <code><span></code> within Markdown when you can't have <code><b></code> and <code><i></code>, or the more meaningful <code><cite></code>, <code><q></code>, <code><dfn></code>, and <code><var></code>? We have to draw the line somewhere, where should it be? Another good question for the list.</p>
+</blockquote>
+
+<p>Any opinion?</p>
+</li>
+
+<li>
+<p><strong>Default ALD for classes of elements.</strong> For example, an header of level 2 inherits automatically the attributes of <code>{header2}</code>, if it is defined.</p>
+
+<pre><code>## Header ##
+
+Paragraph..
+
+## Second Header ## {.mah}
+
+Paragraph..
+
+{header2}: .myclass
+{paragraph}: .withmargins</code></pre>
+</li>
+</ul>
+
+<p>In this example:</p>
+
+<ul>
+<li>the first header has attributes <code>class=myclass</code></li>
+
+<li>the second header has attributes <code>class="myclass mah"</code></li>
+
+<li>the two paragraphs have attributes <code>class=withmargins</code></li>
+</ul>
+
+<h2 id='design_rationale'><span class='maruku_section_number'>7. </span>Design rationale</h2>
+
+<ul>
+<li>
+<p>Question: should we allow whitespace at the sides of <code>=</code> in key/value pairs?</p>
+
+<blockquote>
+<p>No, because it is difficult to parse.</p>
+</blockquote>
+</li>
+
+<li>
+<p>Question: should <code>:</code> be a synonym for <code>=</code> in attributes list?</p>
+
+<blockquote>
+<p>No, because ':' is used for XML namespaces (<code>xml:lang=en</code>)</p>
+</blockquote>
+</li>
+</ul>
+
+<div class='maruku_signature'>
+<hr />
+<span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown interpreter'>Maruku</a> at 00:21 on Wednesday, January 03rd, 2007.</span></div>
+</body></html>