Changeset 232
- Timestamp:
- 02/11/2008 17:00:48 (9 months ago)
- Location:
- branches/superredcloth
- Files:
-
- 6 modified
-
lib/superredcloth.rb (modified) (1 diff)
-
test/hobix.yml (modified) (8 diffs)
-
test/instiki.yml (modified) (1 diff)
-
test/poignant.yml (modified) (1 diff)
-
test/table.yml (modified) (4 diffs)
-
test/textism.yml (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/superredcloth/lib/superredcloth.rb
r231 r232 5 5 atts = '' 6 6 opts[:"text-align"] = opts.delete(:align) 7 opts[:style] += ';' if opts[:style] && (opts[:style][-1..-1] != ';') 7 8 [:float, :"text-align", :"vertical-align"].each do |a| 8 9 opts[:style] = "#{a}:#{opts[a]};#{opts[:style]}" if opts[a] -
branches/superredcloth/test/hobix.yml
r231 r232 176 176 of most soft drinks. 177 177 out: |- 178 <p>I’m <span style="color:red ">unaware</span><br />178 <p>I’m <span style="color:red;">unaware</span><br /> 179 179 of most soft drinks.</p> 180 180 --- … … 197 197 desc: Style settings can be provided directly by surrounding them in curly braces. 198 198 in: p{color:blue;margin:30px}. Spacey blue 199 out: <p style="color:blue;margin:30px ">Spacey blue</p>199 out: <p style="color:blue;margin:30px;">Spacey blue</p> 200 200 --- 201 201 name: language designations … … 212 212 %[es]cabeza%. 213 213 out: |- 214 <p>I seriously <strong style="color:red ">blushed</strong><br />214 <p>I seriously <strong style="color:red;">blushed</strong><br /> 215 215 when I <em class="big">sprouted</em> that<br /> 216 216 corn stalk from my<br /> … … 235 235 desc: And, furthermore, coupled with language settings and CSS styles. 236 236 in: h3()>[no]{color:red}. Bingo 237 out: <h3 style="padding-left:1em;padding-right:1em;text-align:right;color:red " lang="no">Bingo</h3>237 out: <h3 style="padding-left:1em;padding-right:1em;text-align:right;color:red;" lang="no">Bingo</h3> 238 238 --- 239 239 name: code blocks … … 394 394 machine and paid it to sing to them. 395 395 out: |- 396 <p style="float:right "><img src="obake.gif" alt="" /></p>396 <p style="float:right;"><img src="obake.gif" alt="" /></p> 397 397 398 398 <p>And others sat all round the small<br /> … … 543 543 <table> 544 544 <tr> 545 <td style="background:#ddd ">Grey cell</td>545 <td style="background:#ddd;">Grey cell</td> 546 546 </tr> 547 547 </table> … … 554 554 |This|is|a|row| 555 555 out: |- 556 <table style="border:1px solid black ">556 <table style="border:1px solid black;"> 557 557 <tr> 558 558 <td>This</td> … … 582 582 <td>row</td> 583 583 </tr> 584 <tr style="background:#ddd ">584 <tr style="background:#ddd;"> 585 585 <td>This</td> 586 586 <td>is</td> -
branches/superredcloth/test/instiki.yml
r228 r232 15 15 --- 16 16 in: '%{color:red}nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span>%' 17 out: '<p><span style="color:red ">nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span></span></p>'17 out: '<p><span style="color:red;">nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span></span></p>' 18 18 --- 19 19 in: |- -
branches/superredcloth/test/poignant.yml
r211 r232 62 62 Now that you've met @false@, I'm sure you can see what's on next. 63 63 64 out: "<h3>False</h3>\n\n\t<p style=\"float:left \"><img src=\"i/blix-neg.gif\" title=\"Shape of a cat.\" alt=\"Shape of a cat.\" /></p>\n\n\t<p><em>The cat Trady Blix. Frozen in emptiness. Immaculate whiskers rigid. Placid eyes of lake. Tail of warm icicle. Sponsored by a Very Powerful Pause Button.</em></p>\n\n\t<p>The darkness surrounding Blix can be called <strong>negative space</strong>. Hang on to that phrase. Let it suggest that the emptiness has a negative connotation. In a similar way, <code>nil</code> has a slightly sour note that it whistles.</p>\n\n\t<p>Generally speaking, everything in Ruby has a positive charge to it. This spark flows through strings, numbers, regexps, all of it. Only two keywords wear a shady cloak: <code>nil</code> and <code>false</code> draggin us down.</p>\n\n\t<p>You can test that charge with an <code>if</code> keyword. It looks very much like the <code>do</code> blocks we saw in the last chapter, in that both end with an <code>end</code>.</p>\n\n\n<pre>\n if plastic_cup\n print \"Plastic cup is on the up 'n' up!\"\n end\n</pre>\n\t<p>If <code>plastic_cup</code> contains either <code>nil</code> or <code>false</code>, you won’t see anything print to the screen. They’re not on the <code>if</code> guest list. So <code>if</code> isn’t going to run any of the code it’s protecting.</p>\n\n\t<p>But <code>nil</code> and <code>false</code> need not walk away in shame. They may be of questionable character, but <code>unless</code> runs a smaller establishment that caters to the bedraggled. The <code>unless</code> keyword has a policy of only allowing those with a negative charge in. Who are: <code>nil</code> and <code>false</code>.</p>\n\n\n<pre>\n unless plastic_cup\n print \"Plastic cup is on the down low.\"\n end\n</pre>\n\t<p>You can also use <code>if</code> and <code>unless</code> at the end of a single line of code, if that’s all that is being protected.</p>\n\n\n<pre>\n print \"Yeah, plastic cup is up again!\" if plastic_cup\n print \"Hardly. It's down.\" unless plastic_cup\n</pre>\n\t<p>Now that you’ve met <code>false</code>, I’m sure you can see what’s on next.</p>"64 out: "<h3>False</h3>\n\n\t<p style=\"float:left;\"><img src=\"i/blix-neg.gif\" title=\"Shape of a cat.\" alt=\"Shape of a cat.\" /></p>\n\n\t<p><em>The cat Trady Blix. Frozen in emptiness. Immaculate whiskers rigid. Placid eyes of lake. Tail of warm icicle. Sponsored by a Very Powerful Pause Button.</em></p>\n\n\t<p>The darkness surrounding Blix can be called <strong>negative space</strong>. Hang on to that phrase. Let it suggest that the emptiness has a negative connotation. In a similar way, <code>nil</code> has a slightly sour note that it whistles.</p>\n\n\t<p>Generally speaking, everything in Ruby has a positive charge to it. This spark flows through strings, numbers, regexps, all of it. Only two keywords wear a shady cloak: <code>nil</code> and <code>false</code> draggin us down.</p>\n\n\t<p>You can test that charge with an <code>if</code> keyword. It looks very much like the <code>do</code> blocks we saw in the last chapter, in that both end with an <code>end</code>.</p>\n\n\n<pre>\n if plastic_cup\n print \"Plastic cup is on the up 'n' up!\"\n end\n</pre>\n\t<p>If <code>plastic_cup</code> contains either <code>nil</code> or <code>false</code>, you won’t see anything print to the screen. They’re not on the <code>if</code> guest list. So <code>if</code> isn’t going to run any of the code it’s protecting.</p>\n\n\t<p>But <code>nil</code> and <code>false</code> need not walk away in shame. They may be of questionable character, but <code>unless</code> runs a smaller establishment that caters to the bedraggled. The <code>unless</code> keyword has a policy of only allowing those with a negative charge in. Who are: <code>nil</code> and <code>false</code>.</p>\n\n\n<pre>\n unless plastic_cup\n print \"Plastic cup is on the down low.\"\n end\n</pre>\n\t<p>You can also use <code>if</code> and <code>unless</code> at the end of a single line of code, if that’s all that is being protected.</p>\n\n\n<pre>\n print \"Yeah, plastic cup is up again!\" if plastic_cup\n print \"Hardly. It's down.\" unless plastic_cup\n</pre>\n\t<p>Now that you’ve met <code>false</code>, I’m sure you can see what’s on next.</p>" -
branches/superredcloth/test/table.yml
r231 r232 65 65 |This|is|a|row| 66 66 out: |- 67 <table style="border:1px solid black ">67 <table style="border:1px solid black;"> 68 68 <tr> 69 69 <td>This</td> … … 84 84 out: |- 85 85 <table> 86 <tr style="background:#ddd ">86 <tr style="background:#ddd;"> 87 87 <td>This</td> 88 88 <td>is</td> … … 158 158 <table> 159 159 <tr> 160 <td style="background:#ddd ">Cell with gray background</td>160 <td style="background:#ddd;">Cell with gray background</td> 161 161 </tr> 162 162 <tr> … … 182 182 out: |- 183 183 <table> 184 <tr style="background:#ddd ">184 <tr style="background:#ddd;"> 185 185 <td>S</td> 186 186 <td>Target</td> -
branches/superredcloth/test/textism.yml
r231 r232 103 103 --- 104 104 in: %{color:red}red% 105 out: <p><span style="color:red ">red</span></p>105 out: <p><span style="color:red;">red</span></p> 106 106 --- 107 107 in: %[fr]rouge% … … 115 115 --- 116 116 in: p{color:#ddd}. A paragraph 117 out: <p style="color:#ddd ">A paragraph</p>117 out: <p style="color:#ddd;">A paragraph</p> 118 118 --- 119 119 in: p[fr]. A paragraph … … 127 127 --- 128 128 in: '!>/image.gif! right-aligned image' 129 out: <p style="float:right "><img src="/image.gif" alt="" /> right-aligned image</p>129 out: <p style="float:right;"><img src="/image.gif" alt="" /> right-aligned image</p> 130 130 --- 131 131 in: p[no]{color:red}. A Norse of a different colour. 132 out: <p style="color:red " lang="no">A Norse of a different colour.</p>132 out: <p style="color:red;" lang="no">A Norse of a different colour.</p> 133 133 --- 134 134 in: |- … … 158 158 |This|is|a|row| 159 159 out: |- 160 <table style="border:1px solid black ">160 <table style="border:1px solid black;"> 161 161 <tr> 162 162 <td>This</td> … … 176 176 out: |- 177 177 <table> 178 <tr style="background:#ddd ">178 <tr style="background:#ddd;"> 179 179 <td>This</td> 180 180 <td>is</td> … … 192 192 <table> 193 193 <tr> 194 <td style="background:#ddd ">Cell with gray background</td>194 <td style="background:#ddd;">Cell with gray background</td> 195 195 </tr> 196 196 <tr> … … 233 233 234 234 out: |- 235 <h2 style="color:green ">This is a title</h2>235 <h2 style="color:green;">This is a title</h2> 236 236 <h3>This is a subhead</h3> 237 <p style="color:red ">This is some text of dubious character. Isn’t the use of “quotes” just lazy writing — and theft of ‘intellectual property’ besides? I think the time has come to see a block quote.</p>237 <p style="color:red;">This is some text of dubious character. Isn’t the use of “quotes” just lazy writing — and theft of ‘intellectual property’ besides? I think the time has come to see a block quote.</p> 238 238 <blockquote lang="fr"> 239 239 <p lang="fr">This is a block quote. I’ll admit it’s not the most exciting block quote ever devised.</p> 240 240 </blockquote> 241 241 <p>Simple list:</p> 242 <ol style="color:blue ">242 <ol style="color:blue;"> 243 243 <li>one</li> 244 244 <li>two</li> … … 332 332 |this|<>{padding:10px}. is|^. another|(bob#bob). row| 333 333 out: |- 334 <table style="border:1px solid black ">334 <table style="border:1px solid black;"> 335 335 <tr> 336 336 <th>this</th> … … 339 339 <th>header</th> 340 340 </tr> 341 <tr style="text-align:left;background:gray ">341 <tr style="text-align:left;background:gray;"> 342 342 <td colspan="2">this is</td> 343 <td style="background:red;width:200px ">a</td>344 <td style="vertical-align:top;text-align:justify;height:200px ">row</td>343 <td style="background:red;width:200px;">a</td> 344 <td style="vertical-align:top;text-align:justify;height:200px;">row</td> 345 345 </tr> 346 346 <tr>