From 26b4aa77f5b85f47a96a5930a67dfbec53b8710d Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sat, 9 Feb 2008 04:38:33 +0000 Subject: No longer replacing " with @quot;. Fixes [1862742] --- tests/markdown-test/benchmark.dat.tmp | 38 +++++----- .../blockquotes-with-dode-blocks.html | 4 +- .../markdown-documentation-basics.html | 30 ++++---- tests/markdown-test/markdown-syntax.html | 85 +++++++++++----------- 4 files changed, 77 insertions(+), 80 deletions(-) (limited to 'tests/markdown-test') diff --git a/tests/markdown-test/benchmark.dat.tmp b/tests/markdown-test/benchmark.dat.tmp index e8ca4f4..4a43ce5 100644 --- a/tests/markdown-test/benchmark.dat.tmp +++ b/tests/markdown-test/benchmark.dat.tmp @@ -1,20 +1,20 @@ construction:0.000000:0.000000 -amps-and-angle-encoding:0.250000:266240.000000 -auto-links:0.230000:0.000000 -backlash-escapes:0.950000:245760.000000 -blockquotes-with-dode-blocks:0.070000:0.000000 -hard-wrapped:0.060000:0.000000 -horizontal-rules:0.700000:0.000000 -inline-html-advanced:0.280000:0.000000 -inline-html-comments:0.340000:0.000000 -inline-html-simple:0.970000:0.000000 -links-inline:0.500000:0.000000 -links-reference:0.650000:0.000000 -literal-quotes:0.390000:0.000000 -markdown-documentation-basics:3.390000:1437696.000000 -markdown-syntax:14.780000:2035712.000000 -nested-blockquotes:0.520000:-110592.000000 -ordered-and-unordered-list:2.210000:0.000000 -strong-and-em-together:0.640000:0.000000 -tabs:0.690000:0.000000 -tidyness:0.590000:0.000000 +amps-and-angle-encoding:0.060000:397312.000000 +auto-links:0.070000:0.000000 +backlash-escapes:0.230000:131072.000000 +blockquotes-with-dode-blocks:0.020000:0.000000 +hard-wrapped:0.030000:0.000000 +horizontal-rules:0.160000:0.000000 +inline-html-advanced:0.060000:0.000000 +inline-html-comments:0.070000:0.000000 +inline-html-simple:0.190000:0.000000 +links-inline:0.110000:0.000000 +links-reference:0.120000:0.000000 +literal-quotes:0.080000:0.000000 +markdown-documentation-basics:0.620000:1482752.000000 +markdown-syntax:4.120000:2621440.000000 +nested-blockquotes:0.110000:0.000000 +ordered-and-unordered-list:0.390000:0.000000 +strong-and-em-together:0.130000:0.000000 +tabs:0.140000:0.000000 +tidyness:0.110000:0.000000 diff --git a/tests/markdown-test/blockquotes-with-dode-blocks.html b/tests/markdown-test/blockquotes-with-dode-blocks.html index ef5c40d..275749f 100644 --- a/tests/markdown-test/blockquotes-with-dode-blocks.html +++ b/tests/markdown-test/blockquotes-with-dode-blocks.html @@ -2,12 +2,12 @@

Example:

sub status {
-    print "working";
+    print "working";
 }
 

Or:

sub status {
-    return "working";
+    return "working";
 }
 
diff --git a/tests/markdown-test/markdown-documentation-basics.html b/tests/markdown-test/markdown-documentation-basics.html index 1dafe24..744e89d 100644 --- a/tests/markdown-test/markdown-documentation-basics.html +++ b/tests/markdown-test/markdown-documentation-basics.html @@ -32,7 +32,7 @@

Markdown offers two styles of headers: Setext and atx. Setext-style headers for <h1> and <h2> are created by - "underlining" with equal signs (=) and hyphens (-), respectively. + "underlining" with equal signs (=) and hyphens (-), respectively. To create an atx-style header, you put 1-6 hash marks (#) at the beginning of the line -- the number of hashes equals the resulting HTML header level. @@ -168,14 +168,14 @@ Or, if you prefer, <strong>use two underscores instead</strong>.<

This is an [example link](http://example.com/).
 

Output:

-
<p>This is an <a href="http://example.com/">
+
<p>This is an <a href="http://example.com/">
 example link</a>.</p>
 

Optionally, you may include a title attribute in the parentheses:

-
This is an [example link](http://example.com/ "With a Title").
+
This is an [example link](http://example.com/ "With a Title").
 

Output:

-
<p>This is an <a href="http://example.com/" title="With a Title">
+
<p>This is an <a href="http://example.com/" title="With a Title">
 example link</a>.</p>
 

Reference-style links allow you to refer to your links by names, which you define elsewhere in your document: @@ -183,15 +183,15 @@ example link</a>.</p>

I get 10 times more traffic from [Google][1] than from
 [Yahoo][2] or [MSN][3].
 
-[1]: http://google.com/        "Google"
-[2]: http://search.yahoo.com/  "Yahoo Search"
-[3]: http://search.msn.com/    "MSN Search"
+[1]: http://google.com/        "Google"
+[2]: http://search.yahoo.com/  "Yahoo Search"
+[3]: http://search.msn.com/    "MSN Search"
 

Output:

-
<p>I get 10 times more traffic from <a href="http://google.com/"
-title="Google">Google</a> than from <a href="http://search.yahoo.com/"
-title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
-title="MSN Search">MSN</a>.</p>
+
<p>I get 10 times more traffic from <a href="http://google.com/"
+title="Google">Google</a> than from <a href="http://search.yahoo.com/"
+title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
+title="MSN Search">MSN</a>.</p>
 

The title attribute is optional. Link names may contain letters, numbers and spaces, but are not case sensitive:

@@ -202,22 +202,22 @@ title="MSN Search">MSN</a>.</p>

Output:

<p>I start my morning with a cup of coffee and
-<a href="http://www.nytimes.com/">The New York Times</a>.</p>
+<a href="http://www.nytimes.com/">The New York Times</a>.</p>
 

Images

Image syntax is very much like link syntax.

Inline (titles are optional):

-
![alt text](/path/to/img.jpg "Title")
+
![alt text](/path/to/img.jpg "Title")
 

Reference-style:

![alt text][id]
 
-[id]: /path/to/img.jpg "Title"
+[id]: /path/to/img.jpg "Title"
 

Both of the above examples produce the same output:

-
<img src="/path/to/img.jpg" alt="alt text" title="Title" />
+
<img src="/path/to/img.jpg" alt="alt text" title="Title" />
 

Code

In a regular paragraph, you can create code span by wrapping text in diff --git a/tests/markdown-test/markdown-syntax.html b/tests/markdown-test/markdown-syntax.html index a0440e4..c789d95 100644 --- a/tests/markdown-test/markdown-syntax.html +++ b/tests/markdown-test/markdown-syntax.html @@ -1,5 +1,3 @@ - -

Markdown: Syntax

  • Main
  • @@ -224,17 +222,17 @@ This is another regular paragraph. blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    -

    The implication of the "one or more consecutive lines of text" rule is - that Markdown supports "hard-wrapped" text paragraphs. This differs +

    The implication of the "one or more consecutive lines of text" rule is + that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable - Type's "Convert Line Breaks" option) which translate every line break + Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    Yes, this takes a tad more effort to create a <br />, but a simplistic - "every line break is a <br />" rule wouldn't work for Markdown. + "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

    @@ -242,7 +240,7 @@ This is another regular paragraph.

    Markdown supports two styles of headers, Setext and atx.

    -

    Setext-style headers are "underlined" using equal signs (for first-level +

    Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:

    This is an H1
    @@ -260,7 +258,7 @@ This is an H2
     ## This is an H2
     
     ###### This is an H6
    -

    Optionally, you may "close" atx-style headers. This is purely +

Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes @@ -311,7 +309,7 @@ id sem consectetuer libero luctus adipiscing. > > Here's some example code: > -> return shell_exec("echo $input | $markdown_script"); +> return shell_exec("echo $input | $markdown_script");

Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu. @@ -478,14 +476,14 @@ sit amet, consectetuer adipiscing elit.

Here is an example of AppleScript:
 
-    tell application "Foo"
+    tell application "Foo"
         beep
     end tell
 

will turn into:

<p>Here is an example of AppleScript:</p>
 
-<pre><code>tell application "Foo"
+<pre><code>tell application "Foo"
     beep
 end tell
 </code></pre>
@@ -498,12 +496,12 @@ end tell
    it and indent it, and Markdown will handle the hassle of encoding the
    ampersands and angle brackets. For example, this:
 

-
    <div class="footer">
+
    <div class="footer">
         &copy; 2004 Foo Corporation
     </div>
 

will turn into:

-
<pre><code>&lt;div class="footer"&gt;
+
<pre><code>&lt;div class="footer"&gt;
     &amp;copy; 2004 Foo Corporation
 &lt;/div&gt;
 </code></pre>
@@ -544,15 +542,15 @@ _ _ _
    put the URL where you want the link to point, along with an optional
    title for the link, surrounded in quotes. For example:
 

-
This is [an example](http://example.com/ "Title") inline link.
+
This is [an example](http://example.com/ "Title") inline link.
 
 [This link](http://example.net/) has no title attribute.
 

Will produce:

-
<p>This is <a href="http://example.com/" title="Title">
+
<p>This is <a href="http://example.com/" title="Title">
 an example</a> inline link.</p>
 
-<p><a href="http://example.net/">This link</a> has no
+<p><a href="http://example.net/">This link</a> has no
 title attribute.</p>
 

If you're referring to a local resource on the same server, you can use relative paths: @@ -568,7 +566,7 @@ title attribute.</p>

Then, anywhere in the document, you define your link label like this, on a line by itself:

-
[id]: http://example.com/  "Optional Title Here"
+
[id]: http://example.com/  "Optional Title Here"
 

That is:

    @@ -596,12 +594,12 @@ title attribute.</p>

The link URL may, optionally, be surrounded by angle brackets:

-
[id]: <http://example.com/>  "Optional Title Here"
+
[id]: <http://example.com/>  "Optional Title Here"
 

You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:

[id]: http://example.com/longish/path/to/resource/here
-    "Optional Title Here"
+    "Optional Title Here"
 

Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output.

@@ -614,7 +612,7 @@ title attribute.</p>

The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word - "Google" to the google.com web site, you could simply write: + "Google" to the google.com web site, you could simply write:

[Google][]
 

And then define the link: @@ -637,29 +635,29 @@ title attribute.</p>

I get 10 times more traffic from [Google] [1] than from
 [Yahoo] [2] or [MSN] [3].
 
-  [1]: http://google.com/        "Google"
-  [2]: http://search.yahoo.com/  "Yahoo Search"
-  [3]: http://search.msn.com/    "MSN Search"
+  [1]: http://google.com/        "Google"
+  [2]: http://search.yahoo.com/  "Yahoo Search"
+  [3]: http://search.msn.com/    "MSN Search"
 

Using the implicit link name shortcut, you could instead write:

I get 10 times more traffic from [Google][] than from
 [Yahoo][] or [MSN][].
 
-  [google]: http://google.com/        "Google"
-  [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
-  [msn]:    http://search.msn.com/    "MSN Search"
+  [google]: http://google.com/        "Google"
+  [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
+  [msn]:    http://search.msn.com/    "MSN Search"
 

Both of the above examples will produce the following HTML output:

-
<p>I get 10 times more traffic from <a href="http://google.com/"
-title="Google">Google</a> than from
-<a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
-or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
+
<p>I get 10 times more traffic from <a href="http://google.com/"
+title="Google">Google</a> than from
+<a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
+or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
 

For comparison, here is the same paragraph written using Markdown's inline link style:

-
I get 10 times more traffic from [Google](http://google.com/ "Google")
-than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
-[MSN](http://search.msn.com/ "MSN Search").
+
I get 10 times more traffic from [Google](http://google.com/ "Google")
+than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
+[MSN](http://search.msn.com/ "MSN Search").
 

The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using @@ -757,7 +755,7 @@ A backtick-delimited string in a code span: `` `foo` `` equivalent of <code>&amp;mdash;</code>.</p>

Images

-

Admittedly, it's fairly difficult to devise a "natural" syntax for +

Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format.

Markdown uses an image syntax that is intended to resemble the syntax @@ -767,7 +765,7 @@ equivalent of <code>&amp;mdash;</code>.</p>

![Alt text](/path/to/img.jpg)
 
-![Alt text](/path/to/img.jpg "Optional title")
+![Alt text](/path/to/img.jpg "Optional title")
 

That is:

    @@ -789,10 +787,10 @@ or single quotes.

    Reference-style image syntax looks like this:

    ![Alt text][id]
    -

    Where "id" is the name of a defined image reference. Image references +

Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:

-
[id]: url/to/image  "Optional title attribute"
+
[id]: url/to/image  "Optional title attribute"
 

As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags. @@ -803,12 +801,12 @@ or single quotes.

-

Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this: +

Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

<http://example.com/>
 

Markdown will turn this into:

-
<a href="http://example.com/">http://example.com/</a>
+
<a href="http://example.com/">http://example.com/</a>
 

Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting @@ -817,11 +815,11 @@ or single quotes.

<address@example.com>
 

into something like this:

-
<a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
+
<a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
 &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
-&#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
+&#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
 &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
-

which will render in a browser as a clickable link to "address@example.com". +

which will render in a browser as a clickable link to "address@example.com".

(This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of @@ -851,5 +849,4 @@ _ underscore - minus sign (hyphen) . dot ! exclamation mark -

- +
\ No newline at end of file -- cgit v1.2.3