[DRE-commits] [ruby-org] 202/303: Update syntax highlight testcases
Jérémy Bobbio
lunar at alioth.debian.org
Fri Aug 9 17:33:57 UTC 2013
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository ruby-org.
commit 03e4544deaad61f86249f61344a650eb34a4edcc
Author: Waldemar Quevedo <waldemar.quevedo at gmail.com>
Date: Sun Dec 16 11:14:38 2012 +0900
Update syntax highlight testcases
---
.../advanced-code-coderay.html | 54 ++++++++------------
.../advanced-code-no-color.html | 24 ++++-----
.../advanced-code-pygments.html | 6 ++-
.../code-coderay.html | 3 +-
.../code-no-color.html | 6 +--
.../src-code-list-coderay.html | 9 ++--
.../src-code-list-no-color.html | 9 ++--
7 files changed, 43 insertions(+), 68 deletions(-)
diff --git a/spec/html_code_syntax_highlight_examples/advanced-code-coderay.html b/spec/html_code_syntax_highlight_examples/advanced-code-coderay.html
index 93fe823..bf2b4a7 100644
--- a/spec/html_code_syntax_highlight_examples/advanced-code-coderay.html
+++ b/spec/html_code_syntax_highlight_examples/advanced-code-coderay.html
@@ -3,7 +3,7 @@
<h1><span class="heading-number heading-number-1">1 </span>Inline examples</h1>
<p>This should work:</p>
<pre class="example">
- fixed width? how does this work?
+ fixed width? how does this work?
...........
............
.
@@ -23,8 +23,7 @@
str.scan(<span style="color:#33B">@org_emphasis_regexp</span>) <span style="color:#080;font-weight:bold">do</span> |match|
<span style="color:#080;font-weight:bold">yield</span> <span style="color:#d70">$2</span>, <span style="color:#d70">$3</span>
<span style="color:#080;font-weight:bold">end</span>
- <span style="color:#080;font-weight:bold">end</span>
-</pre>
+ <span style="color:#080;font-weight:bold">end</span></pre>
<p>Now let’s test case-insensitive code blocks.</p>
<pre class="src src-ruby">
<span style="color:#777"># Finds all emphasis matches in a string.</span>
@@ -33,8 +32,7 @@
str.scan(<span style="color:#33B">@org_emphasis_regexp</span>) <span style="color:#080;font-weight:bold">do</span> |match|
<span style="color:#080;font-weight:bold">yield</span> <span style="color:#d70">$2</span>, <span style="color:#d70">$3</span>
<span style="color:#080;font-weight:bold">end</span>
- <span style="color:#080;font-weight:bold">end</span>
-</pre>
+ <span style="color:#080;font-weight:bold">end</span></pre>
<pre class="src src-clojure">
(<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">fib-seq</span>
(<span style="color:#080;font-weight:bold">concat</span>
@@ -43,35 +41,32 @@
(lazy-cons (<span style="color:#080;font-weight:bold">+</span> a b) (rfib b (<span style="color:#080;font-weight:bold">+</span> a b)))) <span style="color:#00D">0</span> <span style="color:#00D">1</span>)))
user> (<span style="color:#080;font-weight:bold">take</span> <span style="color:#00D">20</span> fib-seq)
-(<span style="color:#00D">0</span> <span style="color:#00D">1</span> <span style="color:#00D">1</span> <span style="color:#00D">2</span> <span style="color:#00D">3</span> <span style="color:#00D">5</span> <span style="color:#00D">8</span> <span style="color:#00D">13</span> <span style="color:#00D">21</span> <span style="color:#00D">34</span> <span style="color:#00D">55</span> <span style="color:#00D">89</span> <span style="color:#00D">144</span> <span style="color:#00D">233</span> <span [...]
-</pre>
+(<span style="color:#00D">0</span> <span style="color:#00D">1</span> <span style="color:#00D">1</span> <span style="color:#00D">2</span> <span style="color:#00D">3</span> <span style="color:#00D">5</span> <span style="color:#00D">8</span> <span style="color:#00D">13</span> <span style="color:#00D">21</span> <span style="color:#00D">34</span> <span style="color:#00D">55</span> <span style="color:#00D">89</span> <span style="color:#00D">144</span> <span style="color:#00D">233</span> <span [...]
<p>Even if no language is set, it is still wrapped in code tags but class is empty.</p>
<pre class="src">
-echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers
-</pre>
+echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers</pre>
<h1><span class="heading-number heading-number-1">3 </span>It should be possible to write a colon at the beginning of an example</h1>
<blockquote>
- <p>I really love to write about :symbols. They sure are the best things in the world!</p>
+ <p>I really love to write about
+:symbols. They sure are the
+best things in the world!</p>
</blockquote>
<pre class="src src-ruby">
{
<span style="color:#A60">:one</span> => <span style="color:#00D">1</span>,
<span style="color:#A60">:two</span> => <span style="color:#00D">2</span>
-}
-</pre>
+}</pre>
<pre class="src src-clojure">
(defproject helloworld <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">0.1</span><span style="color:#710">"</span></span>
<span style="color:#A60">:dependencies</span> [[org.clojure/clojure
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">1.1.0-master-SNAPSHOT</span><span style="color:#710">"</span></span>]
[org.clojure/clojure-contrib
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">1.0-SNAPSHOT</span><span style="color:#710">"</span></span>]]
-<span style="color:#A60">:main</span> helloworld)
-</pre>
+<span style="color:#A60">:main</span> helloworld)</pre>
<h1><span class="heading-number heading-number-1">4 </span>Code syntax highlight with Coderay</h1>
<h2><span class="heading-number heading-number-2">4.1 </span>No language selected</h2>
<pre class="src">
-Nothing to see here
-</pre>
+Nothing to see here</pre>
<h2><span class="heading-number heading-number-2">4.2 </span>CSS example</h2>
<pre class="src src-css">
<span style="color:#339;font-weight:bold">*</span> {
@@ -79,8 +74,7 @@ Nothing to see here
<span style="color:#606">box-sizing</span>: <span style="color:#088">border-box</span>;
<span style="color:#606">-moz-box-sizing</span>: <span style="color:#088">border-box</span>;
<span style="color:#606">-webkit-box-sizing</span>: <span style="color:#088">border-box</span>;
- }
-</pre>
+ }</pre>
<h2><span class="heading-number heading-number-2">4.3 </span>HTML example</h2>
<pre class="src src-html">
<span style="color:#070"><html></span>
@@ -90,23 +84,20 @@ Nothing to see here
<span style="color:#070"><body></span>
<span style="color:#070"><h1></span>Hello<span style="color:#070"></h1></span>
<span style="color:#070"></body></span>
-<span style="color:#070"></html></span>
-</pre>
+<span style="color:#070"></html></span></pre>
<h2><span class="heading-number heading-number-2">4.4 </span>Ruby example</h2>
<pre class="src src-ruby">
<span style="color:#080;font-weight:bold">class</span> <span style="color:#B06;font-weight:bold">Post</span> << <span style="color:#036;font-weight:bold">ActiveRecord</span>::<span style="color:#036;font-weight:bold">Base</span>
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">print_title</span>
puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span><span style="color:#069">self</span>.title<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">"</span></span>
<span style="color:#080;font-weight:bold">end</span>
-<span style="color:#080;font-weight:bold">end</span>
-</pre>
+<span style="color:#080;font-weight:bold">end</span></pre>
<h2><span class="heading-number heading-number-2">4.5 </span>Python example</h2>
<pre class="src src-python">
<span style="color:#080;font-weight:bold">import</span> <span style="color:#B44;font-weight:bold">mapnik</span>
m = mapnik.Map(<span style="color:#00D">600</span>, <span style="color:#00D">800</span>)
-m.background = Map.Color(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">steelblue</span><span style="color:#710">'</span></span>)
-</pre>
+m.background = Map.Color(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">steelblue</span><span style="color:#710">'</span></span>)</pre>
<h2><span class="heading-number heading-number-2">4.6 </span>Javascript example</h2>
<pre class="src src-javascript">
exports = <span style="color:#963">this</span>;
@@ -119,27 +110,22 @@ Posts.<span style="color:#06B;font-weight:bold">index</span> = <span style="colo
<span style="color:#777">// TODO</span>
};
-})(jQuery);
-</pre>
+})(jQuery);</pre>
<h2><span class="heading-number heading-number-2">4.7 </span>JSON example</h2>
<pre class="src src-json">
{ <span style="color:#F00;background-color:#FAA">n</span><span style="color:#F00;background-color:#FAA">a</span><span style="color:#F00;background-color:#FAA">m</span><span style="color:#F00;background-color:#FAA">e</span>: <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Waldemar</span><span style="color:#710">"</span></span>
, <span style="color:#F00;background-color:#FAA">s</span><span style="color:#F00;background-color:#FAA">u</span><span style="color:#F00;background-color:#FAA">r</span><span style="color:#F00;background-color:#FAA">n</span><span style="color:#F00;background-color:#FAA">a</span><span style="color:#F00;background-color:#FAA">m</span><span style="color:#F00;background-color:#FAA">e</span>: <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style= [...]
-}
-</pre>
+}</pre>
<h2><span class="heading-number heading-number-2">4.8 </span>PHP example</h2>
<pre class="src src-php">
<span style="color:#369;font-weight:bold">echo</span> <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Hello</span><span style="color:#710">"</span></span>;
<span style="color:#369;font-weight:bold">phpinfo</span>();
-<span style="color:#369;font-weight:bold">var_dump</span>(some_var);
-</pre>
+<span style="color:#369;font-weight:bold">var_dump</span>(some_var);</pre>
<h2><span class="heading-number heading-number-2">4.9 </span>Elisp example</h2>
<pre class="src src-emacs-lisp">
(defun hello()
(interactive)
- (message "hello"))
-</pre>
+ (message "hello"))</pre>
<h2><span class="heading-number heading-number-2">4.10 </span>Not supported language example</h2>
<pre class="src src-notsupported">
-!+!+++!++!++!++!+
-</pre>
+!+!+++!++!++!++!+</pre>
diff --git a/spec/html_code_syntax_highlight_examples/advanced-code-no-color.html b/spec/html_code_syntax_highlight_examples/advanced-code-no-color.html
index f52581c..fa48372 100644
--- a/spec/html_code_syntax_highlight_examples/advanced-code-no-color.html
+++ b/spec/html_code_syntax_highlight_examples/advanced-code-no-color.html
@@ -3,7 +3,7 @@
<h1><span class="heading-number heading-number-1">1 </span>Inline examples</h1>
<p>This should work:</p>
<pre class="example">
- fixed width? how does this work?
+ fixed width? how does this work?
...........
............
.
@@ -23,8 +23,7 @@
str.scan(@org_emphasis_regexp) do |match|
yield $2, $3
end
- end
-</pre>
+ end</pre>
<p>Now let’s test case-insensitive code blocks.</p>
<pre class="src src-ruby">
# Finds all emphasis matches in a string.
@@ -33,8 +32,7 @@
str.scan(@org_emphasis_regexp) do |match|
yield $2, $3
end
- end
-</pre>
+ end</pre>
<pre class="src src-clojure">
(def fib-seq
(concat
@@ -43,27 +41,25 @@
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
user> (take 20 fib-seq)
-(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)
-</pre>
+(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)</pre>
<p>Even if no language is set, it is still wrapped in code tags but class is empty.</p>
<pre class="src">
-echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers
-</pre>
+echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers</pre>
<h1><span class="heading-number heading-number-1">3 </span>It should be possible to write a colon at the beginning of an example</h1>
<blockquote>
- <p>I really love to write about :symbols. They sure are the best things in the world!</p>
+ <p>I really love to write about
+:symbols. They sure are the
+best things in the world!</p>
</blockquote>
<pre class="src src-ruby">
{
:one => 1,
:two => 2
-}
-</pre>
+}</pre>
<pre class="src src-clojure">
(defproject helloworld "0.1"
:dependencies [[org.clojure/clojure
"1.1.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib
"1.0-SNAPSHOT"]]
-:main helloworld)
-</pre>
+:main helloworld)</pre>
diff --git a/spec/html_code_syntax_highlight_examples/advanced-code-pygments.html b/spec/html_code_syntax_highlight_examples/advanced-code-pygments.html
index 3bf9117..9f25b5f 100644
--- a/spec/html_code_syntax_highlight_examples/advanced-code-pygments.html
+++ b/spec/html_code_syntax_highlight_examples/advanced-code-pygments.html
@@ -3,7 +3,7 @@
<h1><span class="heading-number heading-number-1">1 </span>Inline examples</h1>
<p>This should work:</p>
<pre class="example">
- fixed width? how does this work?
+ fixed width? how does this work?
...........
............
.
@@ -43,7 +43,9 @@
<div class="highlight"><pre>echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers
</pre></div><h1><span class="heading-number heading-number-1">3 </span>It should be possible to write a colon at the beginning of an example</h1>
<blockquote>
- <p>I really love to write about :symbols. They sure are the best things in the world!</p>
+ <p>I really love to write about
+:symbols. They sure are the
+best things in the world!</p>
</blockquote>
<div class="highlight"><pre><span class="p">{</span>
<span class="ss">:one</span> <span class="o">=></span> <span class="mi">1</span><span class="p">,</span>
diff --git a/spec/html_code_syntax_highlight_examples/code-coderay.html b/spec/html_code_syntax_highlight_examples/code-coderay.html
index 609c6b0..233ac57 100644
--- a/spec/html_code_syntax_highlight_examples/code-coderay.html
+++ b/spec/html_code_syntax_highlight_examples/code-coderay.html
@@ -9,5 +9,4 @@
EOF</span></span>
<span style="color:#080;font-weight:bold">end</span>
<span style="color:#080;font-weight:bold">end</span>
-<span style="color:#080;font-weight:bold">end</span>
-</pre>
+<span style="color:#080;font-weight:bold">end</span></pre>
diff --git a/spec/html_code_syntax_highlight_examples/code-no-color.html b/spec/html_code_syntax_highlight_examples/code-no-color.html
index c622b8d..58c981e 100644
--- a/spec/html_code_syntax_highlight_examples/code-no-color.html
+++ b/spec/html_code_syntax_highlight_examples/code-no-color.html
@@ -9,8 +9,7 @@ class Pygments
EOF
end
end
-end
-</pre>
+end</pre>
<p>Now using EXAMPLE blocks instead:</p>
<pre class="example">
def hello()
@@ -30,5 +29,4 @@ class Piano
def play_note(note)
# TODO
end
-end
-</pre>
+end</pre>
diff --git a/spec/html_code_syntax_highlight_examples/src-code-list-coderay.html b/spec/html_code_syntax_highlight_examples/src-code-list-coderay.html
index f21df9e..eccb260 100644
--- a/spec/html_code_syntax_highlight_examples/src-code-list-coderay.html
+++ b/spec/html_code_syntax_highlight_examples/src-code-list-coderay.html
@@ -6,19 +6,16 @@
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">say</span>
puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">cheers</span><span style="color:#710">'</span></span>
<span style="color:#080;font-weight:bold">end</span>
- <span style="color:#080;font-weight:bold">end</span>
- </pre>
+ <span style="color:#080;font-weight:bold">end</span> </pre>
</li>
<li>Bar
<pre class="src src-ruby">
- puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">This should not get lumped into the above line Example</span><span style="color:#710">"</span></span>
- </pre>
+ puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">This should not get lumped into the above line Example</span><span style="color:#710">"</span></span> </pre>
<p>A paragraph should go here.</p>
<ul>
<li>A sublist goes here with another example
<pre class="src src-sh">
- echo "Hello"
- </pre>
+ echo "Hello" </pre>
<p>And this is a paragraph</p>
</li>
</ul>
diff --git a/spec/html_code_syntax_highlight_examples/src-code-list-no-color.html b/spec/html_code_syntax_highlight_examples/src-code-list-no-color.html
index 6d7489c..bf0b755 100644
--- a/spec/html_code_syntax_highlight_examples/src-code-list-no-color.html
+++ b/spec/html_code_syntax_highlight_examples/src-code-list-no-color.html
@@ -6,19 +6,16 @@
def say
puts 'cheers'
end
- end
- </pre>
+ end </pre>
</li>
<li>Bar
<pre class="src src-ruby">
- puts "This should not get lumped into the above line Example"
- </pre>
+ puts "This should not get lumped into the above line Example" </pre>
<p>A paragraph should go here.</p>
<ul>
<li>A sublist goes here with another example
<pre class="src src-sh">
- echo "Hello"
- </pre>
+ echo "Hello" </pre>
<p>And this is a paragraph</p>
</li>
</ul>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-org.git
More information about the Pkg-ruby-extras-commits
mailing list