Changeset 232

Show
Ignore:
Timestamp:
02/11/2008 17:00:48 (9 months ago)
Author:
jgarber
Message:

Make use of final semicolon in style attribute consistent internally and with Tetxile 2.

Location:
branches/superredcloth
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • branches/superredcloth/lib/superredcloth.rb

    r231 r232  
    55    atts = '' 
    66    opts[:"text-align"] = opts.delete(:align) 
     7    opts[:style] += ';' if opts[:style] && (opts[:style][-1..-1] != ';') 
    78    [:float, :"text-align", :"vertical-align"].each do |a| 
    89      opts[:style] = "#{a}:#{opts[a]};#{opts[:style]}" if opts[a] 
  • branches/superredcloth/test/hobix.yml

    r231 r232  
    176176  of most soft drinks. 
    177177out: |- 
    178   <p>I&#8217;m <span style="color:red">unaware</span><br /> 
     178  <p>I&#8217;m <span style="color:red;">unaware</span><br /> 
    179179  of most soft drinks.</p> 
    180180---  
     
    197197desc: Style settings can be provided directly by surrounding them in curly braces. 
    198198in: p{color:blue;margin:30px}. Spacey blue 
    199 out: <p style="color:blue;margin:30px">Spacey blue</p> 
     199out: <p style="color:blue;margin:30px;">Spacey blue</p> 
    200200---  
    201201name: language designations 
     
    212212  %[es]cabeza%. 
    213213out: |- 
    214   <p>I seriously <strong style="color:red">blushed</strong><br /> 
     214  <p>I seriously <strong style="color:red;">blushed</strong><br /> 
    215215  when I <em class="big">sprouted</em> that<br /> 
    216216  corn stalk from my<br /> 
     
    235235desc: And, furthermore, coupled with language settings and CSS styles. 
    236236in: h3()>[no]{color:red}. Bingo 
    237 out: <h3 style="padding-left:1em;padding-right:1em;text-align:right;color:red" lang="no">Bingo</h3> 
     237out: <h3 style="padding-left:1em;padding-right:1em;text-align:right;color:red;" lang="no">Bingo</h3> 
    238238---  
    239239name: code blocks 
     
    394394  machine and paid it to sing to them. 
    395395out: |- 
    396   <p style="float:right"><img src="obake.gif" alt="" /></p> 
     396  <p style="float:right;"><img src="obake.gif" alt="" /></p> 
    397397   
    398398        <p>And others sat all round the small<br /> 
     
    543543  <table> 
    544544                <tr> 
    545                         <td style="background:#ddd">Grey cell</td> 
     545                        <td style="background:#ddd;">Grey cell</td> 
    546546                </tr> 
    547547        </table> 
     
    554554  |This|is|a|row| 
    555555out: |- 
    556   <table style="border:1px solid black"> 
     556  <table style="border:1px solid black;"> 
    557557                <tr> 
    558558                        <td>This</td> 
     
    582582                        <td>row</td> 
    583583                </tr> 
    584                 <tr style="background:#ddd"> 
     584                <tr style="background:#ddd;"> 
    585585                        <td>This</td> 
    586586                        <td>is</td> 
  • branches/superredcloth/test/instiki.yml

    r228 r232  
    1515--- 
    1616in: '%{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>' 
     17out: '<p><span style="color:red;">nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span></span></p>' 
    1818--- 
    1919in: |- 
  • branches/superredcloth/test/poignant.yml

    r211 r232  
    6262  Now that you've met @false@, I'm sure you can see what's on next. 
    6363 
    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&#8217;t see anything print to the screen.  They&#8217;re not on the <code>if</code> guest list.  So <code>if</code> isn&#8217;t going to run any of the code it&#8217;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&#8217;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&#8217;ve met <code>false</code>, I&#8217;m sure you can see what&#8217;s on next.</p>" 
     64out: "<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&#8217;t see anything print to the screen.  They&#8217;re not on the <code>if</code> guest list.  So <code>if</code> isn&#8217;t going to run any of the code it&#8217;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&#8217;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&#8217;ve met <code>false</code>, I&#8217;m sure you can see what&#8217;s on next.</p>" 
  • branches/superredcloth/test/table.yml

    r231 r232  
    6565  |This|is|a|row| 
    6666out: |- 
    67   <table style="border:1px solid black"> 
     67  <table style="border:1px solid black;"> 
    6868                <tr> 
    6969                        <td>This</td> 
     
    8484out: |- 
    8585  <table> 
    86                 <tr style="background:#ddd"> 
     86                <tr style="background:#ddd;"> 
    8787                        <td>This</td> 
    8888                        <td>is</td> 
     
    158158  <table> 
    159159                <tr> 
    160                         <td style="background:#ddd">Cell with gray background</td> 
     160                        <td style="background:#ddd;">Cell with gray background</td> 
    161161                </tr> 
    162162                <tr> 
     
    182182out: |- 
    183183  <table> 
    184                 <tr style="background:#ddd"> 
     184                <tr style="background:#ddd;"> 
    185185                        <td>S</td> 
    186186                        <td>Target</td> 
  • branches/superredcloth/test/textism.yml

    r231 r232  
    103103--- 
    104104in: %{color:red}red% 
    105 out: <p><span style="color:red">red</span></p> 
     105out: <p><span style="color:red;">red</span></p> 
    106106--- 
    107107in: %[fr]rouge% 
     
    115115--- 
    116116in: p{color:#ddd}. A paragraph 
    117 out: <p style="color:#ddd">A paragraph</p> 
     117out: <p style="color:#ddd;">A paragraph</p> 
    118118--- 
    119119in: p[fr]. A paragraph 
     
    127127--- 
    128128in: '!>/image.gif! right-aligned image' 
    129 out: <p style="float:right"><img src="/image.gif" alt="" /> right-aligned image</p> 
     129out: <p style="float:right;"><img src="/image.gif" alt="" /> right-aligned image</p> 
    130130--- 
    131131in: 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> 
     132out: <p style="color:red;" lang="no">A Norse of a different colour.</p> 
    133133--- 
    134134in: |- 
     
    158158  |This|is|a|row| 
    159159out: |- 
    160   <table style="border:1px solid black"> 
     160  <table style="border:1px solid black;"> 
    161161                <tr> 
    162162                        <td>This</td> 
     
    176176out: |- 
    177177  <table> 
    178                 <tr style="background:#ddd"> 
     178                <tr style="background:#ddd;"> 
    179179                        <td>This</td> 
    180180                        <td>is</td> 
     
    192192  <table> 
    193193                <tr> 
    194                         <td style="background:#ddd">Cell with gray background</td> 
     194                        <td style="background:#ddd;">Cell with gray background</td> 
    195195                </tr> 
    196196                <tr> 
     
    233233   
    234234out: |- 
    235   <h2 style="color:green">This is a title</h2> 
     235  <h2 style="color:green;">This is a title</h2> 
    236236        <h3>This is a subhead</h3> 
    237         <p style="color:red">This is some text of dubious character. Isn&#8217;t the use of &#8220;quotes&#8221; just lazy writing &#8212; and theft of &#8216;intellectual property&#8217; 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&#8217;t the use of &#8220;quotes&#8221; just lazy writing &#8212; and theft of &#8216;intellectual property&#8217; besides? I think the time has come to see a block quote.</p> 
    238238        <blockquote lang="fr"> 
    239239                <p lang="fr">This is a block quote. I&#8217;ll admit it&#8217;s not the most exciting block quote ever devised.</p> 
    240240        </blockquote> 
    241241        <p>Simple list:</p> 
    242   <ol style="color:blue"> 
     242  <ol style="color:blue;"> 
    243243        <li>one</li> 
    244244        <li>two</li> 
     
    332332  |this|<>{padding:10px}. is|^. another|(bob#bob). row| 
    333333out: |- 
    334         <table style="border:1px solid black"> 
     334        <table style="border:1px solid black;"> 
    335335                <tr> 
    336336                        <th>this</th> 
     
    339339                        <th>header</th> 
    340340                </tr> 
    341                 <tr style="text-align:left;background:gray"> 
     341                <tr style="text-align:left;background:gray;"> 
    342342                        <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> 
    345345                </tr> 
    346346                <tr>