RedCloth 4.1.1-universal-java → 4.1.9-universal-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of RedCloth might be problematic. Click here for more details.
- data/CHANGELOG +36 -0
- data/COPYING +1 -1
- data/README +32 -17
- data/Rakefile +1 -0
- data/RedCloth.gemspec +32 -138
- data/ext/redcloth_scan/redcloth.h +53 -22
- data/ext/redcloth_scan/redcloth_attributes.c.rl +2 -3
- data/ext/redcloth_scan/redcloth_attributes.java.rl +5 -6
- data/ext/redcloth_scan/redcloth_attributes.rl +2 -2
- data/ext/redcloth_scan/redcloth_common.rl +5 -1
- data/ext/redcloth_scan/redcloth_inline.c.rl +48 -14
- data/ext/redcloth_scan/redcloth_inline.java.rl +36 -4
- data/ext/redcloth_scan/redcloth_inline.rl +11 -12
- data/ext/redcloth_scan/redcloth_scan.c.rl +12 -14
- data/ext/redcloth_scan/redcloth_scan.java.rl +25 -3
- data/ext/redcloth_scan/redcloth_scan.rl +7 -12
- data/lib/redcloth/formatters/base.rb +26 -20
- data/lib/redcloth/formatters/html.rb +22 -30
- data/lib/redcloth/formatters/latex.rb +45 -17
- data/lib/redcloth/textile_doc.rb +1 -3
- data/lib/redcloth/version.rb +1 -1
- data/lib/redcloth_scan.jar +0 -0
- data/test/basic.yml +16 -2
- data/test/code.yml +6 -7
- data/test/html.yml +15 -1
- data/test/images.yml +23 -0
- data/test/links.yml +27 -1
- data/test/lists.yml +19 -1
- data/test/table.yml +73 -4
- data/test/test_custom_tags.rb +13 -1
- data/test/test_erb.rb +1 -1
- data/test/test_extensions.rb +1 -1
- data/test/test_formatters.rb +1 -1
- data/test/test_parser.rb +1 -1
- data/test/test_restrictions.rb +1 -1
- data/test/textism.yml +1 -1
- data/test/threshold.yml +1 -3
- data/test/validate_fixtures.rb +2 -1
- metadata +7 -16
    
        data/test/links.yml
    CHANGED
    
    | @@ -185,10 +185,14 @@ name: trailing period stays outside link | |
| 185 185 | 
             
            in: '"Link":/foo.html.'
         | 
| 186 186 | 
             
            html: "<p><a href=\"/foo.html\">Link</a>.</p>"
         | 
| 187 187 | 
             
            ---
         | 
| 188 | 
            -
            name:  | 
| 188 | 
            +
            name: whose text is a parenthetical statement
         | 
| 189 189 | 
             
            in: '"(just in case you were wondering)":http://slashdot.org/'
         | 
| 190 190 | 
             
            html: '<p><a href="http://slashdot.org/">(just in case you were wondering)</a></p>'
         | 
| 191 191 | 
             
            ---
         | 
| 192 | 
            +
            name: that has a class and whose text is a parenthetical statement
         | 
| 193 | 
            +
            in: '"(myclass) (just in case you were wondering)":http://slashdot.org/'
         | 
| 194 | 
            +
            html: '<p><a href="http://slashdot.org/" class="myclass">(just in case you were wondering)</a></p>'
         | 
| 195 | 
            +
            ---
         | 
| 192 196 | 
             
            name: link containing parentheses
         | 
| 193 197 | 
             
            in: '"It is (very) fortunate that this works":http://slashdot.org/'
         | 
| 194 198 | 
             
            html: '<p><a href="http://slashdot.org/">It is (very) fortunate that this works</a></p>'
         | 
| @@ -221,6 +225,22 @@ name: links contained in parentheses | |
| 221 225 | 
             
            in: 'This is a regular link (but in parentheses: "Google":http://www.google.com)'
         | 
| 222 226 | 
             
            html: '<p>This is a regular link (but in parentheses: <a href="http://www.google.com">Google</a>)</p>'
         | 
| 223 227 | 
             
            ---
         | 
| 228 | 
            +
            name: links containing parentheses without brackets
         | 
| 229 | 
            +
            in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language)'
         | 
| 230 | 
            +
            html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a></p>'
         | 
| 231 | 
            +
            ---
         | 
| 232 | 
            +
            name: links containing parentheses period at end without brackets
         | 
| 233 | 
            +
            in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language).'
         | 
| 234 | 
            +
            html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a>.</p>'
         | 
| 235 | 
            +
            ---
         | 
| 236 | 
            +
            name: broken links containing parentheses without brackets
         | 
| 237 | 
            +
            in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language'
         | 
| 238 | 
            +
            html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language">Wikipedia article about Textile</a></p>'
         | 
| 239 | 
            +
            ---
         | 
| 240 | 
            +
            name: links containing parentheses without brackets inside a parenthesis
         | 
| 241 | 
            +
            in: 'Textile is awesome! (Check out the "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language))'
         | 
| 242 | 
            +
            html: '<p>Textile is awesome! (Check out the <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a>)</p>'
         | 
| 243 | 
            +
            ---
         | 
| 224 244 | 
             
            name: quotes and follow link
         | 
| 225 245 | 
             
            in: 'Some "text" followed by a "link":http://redcloth.org.'
         | 
| 226 246 | 
             
            html: '<p>Some “text” followed by a <a href="http://redcloth.org">link</a>.</p>'
         | 
| @@ -257,3 +277,9 @@ in: |- | |
| 257 277 | 
             
              "My wife, Tipper, and I will donate 100% of the proceeds of the award to the "Alliance For Climate Protection":http://www.looktothestars.org/charity/638-alliance-for-climate-protection," said Gore in an email. "I am deeply honored to receive the Nobel Peace Prize."
         | 
| 258 278 | 
             
            html: |-
         | 
| 259 279 | 
             
              <p>“My wife, Tipper, and I will donate 100% of the proceeds of the award to the <a href="http://www.looktothestars.org/charity/638-alliance-for-climate-protection">Alliance For Climate Protection</a>,” said Gore in an email. “I am deeply honored to receive the Nobel Peace Prize.”</p>
         | 
| 280 | 
            +
            ---
         | 
| 281 | 
            +
            name: with caps in the title
         | 
| 282 | 
            +
            in: |-
         | 
| 283 | 
            +
              "British Skin Foundation (BSF)":http://www.britishskinfoundation.org.uk
         | 
| 284 | 
            +
            html: |-
         | 
| 285 | 
            +
              <p><a href="http://www.britishskinfoundation.org.uk" title="BSF">British Skin Foundation</a></p>
         | 
    
        data/test/lists.yml
    CHANGED
    
    | @@ -280,4 +280,22 @@ html: |- | |
| 280 280 | 
             
              <ul>
         | 
| 281 281 | 
             
              	<li>One</li>
         | 
| 282 282 | 
             
              	<li>Two</li>
         | 
| 283 | 
            -
              </ul>
         | 
| 283 | 
            +
              </ul>
         | 
| 284 | 
            +
            ---
         | 
| 285 | 
            +
            name: unordered list with leading spaces
         | 
| 286 | 
            +
            in: " * notice the leading space\n * RedCloth 3.0.4 used to accept it\n * Now we do too"
         | 
| 287 | 
            +
            html: |-
         | 
| 288 | 
            +
              <ul>
         | 
| 289 | 
            +
              	<li>notice the leading space</li>
         | 
| 290 | 
            +
              	<li>RedCloth 3.0.4 used to accept it</li>
         | 
| 291 | 
            +
              	<li>Now we do too</li>
         | 
| 292 | 
            +
              </ul>
         | 
| 293 | 
            +
            ---
         | 
| 294 | 
            +
            name: ordered list with leading spaces
         | 
| 295 | 
            +
            in: " # notice the leading space\n # RedCloth 3.0.4 used to accept it\n # Now we do too"
         | 
| 296 | 
            +
            html: |-
         | 
| 297 | 
            +
              <ol>
         | 
| 298 | 
            +
              	<li>notice the leading space</li>
         | 
| 299 | 
            +
              	<li>RedCloth 3.0.4 used to accept it</li>
         | 
| 300 | 
            +
              	<li>Now we do too</li>
         | 
| 301 | 
            +
              </ol>
         | 
    
        data/test/table.yml
    CHANGED
    
    | @@ -18,6 +18,13 @@ html: |- | |
| 18 18 | 
             
              	</tr>
         | 
| 19 19 | 
             
              </table>
         | 
| 20 20 | 
             
              <h3>A header after the table</h3>
         | 
| 21 | 
            +
            latex: |+
         | 
| 22 | 
            +
              \begin{tabular}{ l l l }
         | 
| 23 | 
            +
                a & b & c \\
         | 
| 24 | 
            +
                1 & 2 & 3 \\
         | 
| 25 | 
            +
              \end{tabular}
         | 
| 26 | 
            +
              \subsubsection*{A header after the table}
         | 
| 27 | 
            +
              
         | 
| 21 28 | 
             
            ---
         | 
| 22 29 | 
             
            in: |
         | 
| 23 30 | 
             
              |_. a|_. b|_. c|
         | 
| @@ -56,6 +63,11 @@ html: |- | |
| 56 63 | 
             
              		<td>row</td>
         | 
| 57 64 | 
             
              	</tr>
         | 
| 58 65 | 
             
              </table>
         | 
| 66 | 
            +
            latex: |+
         | 
| 67 | 
            +
              \begin{tabular}{ l l l l l }
         | 
| 68 | 
            +
                This & is & a & simple & table \\
         | 
| 69 | 
            +
                This & is & a & simple & row \\
         | 
| 70 | 
            +
              \end{tabular}
         | 
| 59 71 | 
             
            ---
         | 
| 60 72 | 
             
            in: |-
         | 
| 61 73 | 
             
              table{border:1px solid black}.
         | 
| @@ -144,25 +156,82 @@ html: |- | |
| 144 156 | 
             
              </table>
         | 
| 145 157 | 
             
            ---
         | 
| 146 158 | 
             
            in: |-
         | 
| 147 | 
            -
              |{background:#ddd}. Cell with gray background|
         | 
| 159 | 
            +
              |{background:#ddd}. Cell with gray background|Normal cell|
         | 
| 148 160 | 
             
              |\2. Cell spanning 2 columns|
         | 
| 149 | 
            -
              |/ | 
| 150 | 
            -
               | 
| 161 | 
            +
              |/2. Cell spanning 2 rows|one|
         | 
| 162 | 
            +
              |two|
         | 
| 163 | 
            +
              |>. Right-aligned cell|<. Left-aligned cell|
         | 
| 151 164 | 
             
            html: |-
         | 
| 152 165 | 
             
              <table>
         | 
| 153 166 | 
             
              	<tr>
         | 
| 154 167 | 
             
              		<td style="background:#ddd;">Cell with gray background</td>
         | 
| 168 | 
            +
              		<td>Normal cell</td>
         | 
| 155 169 | 
             
              	</tr>
         | 
| 156 170 | 
             
              	<tr>
         | 
| 157 171 | 
             
              		<td colspan="2">Cell spanning 2 columns</td>
         | 
| 158 172 | 
             
              	</tr>
         | 
| 159 173 | 
             
              	<tr>
         | 
| 160 | 
            -
              		<td rowspan=" | 
| 174 | 
            +
              		<td rowspan="2">Cell spanning 2 rows</td>
         | 
| 175 | 
            +
              		<td>one</td>
         | 
| 176 | 
            +
              	</tr>
         | 
| 177 | 
            +
              	<tr>
         | 
| 178 | 
            +
              		<td>two</td>
         | 
| 161 179 | 
             
              	</tr>
         | 
| 162 180 | 
             
              	<tr>
         | 
| 163 181 | 
             
              		<td style="text-align:right;">Right-aligned cell</td>
         | 
| 182 | 
            +
              		<td style="text-align:left;">Left-aligned cell</td>
         | 
| 183 | 
            +
              	</tr>
         | 
| 184 | 
            +
              </table>
         | 
| 185 | 
            +
            latex: |+
         | 
| 186 | 
            +
              \begin{tabular}{ l l }
         | 
| 187 | 
            +
                Cell with gray background & Normal cell \\
         | 
| 188 | 
            +
                \multicolumn{2}{ l l }{Cell spanning 2 columns} \\
         | 
| 189 | 
            +
                \multirow{2}{*}{Cell spanning 2 rows} & one \\
         | 
| 190 | 
            +
                 & two \\
         | 
| 191 | 
            +
                Right-aligned cell & Left-aligned cell \\
         | 
| 192 | 
            +
              \end{tabular}
         | 
| 193 | 
            +
            ---
         | 
| 194 | 
            +
            name: row spanning mid-row
         | 
| 195 | 
            +
            in: |-
         | 
| 196 | 
            +
              |1|2|3|
         | 
| 197 | 
            +
              |1|/3. 2|3|
         | 
| 198 | 
            +
              |1|3|
         | 
| 199 | 
            +
              |1|3|
         | 
| 200 | 
            +
              |1|2|3|
         | 
| 201 | 
            +
            html: |-
         | 
| 202 | 
            +
              <table>
         | 
| 203 | 
            +
              	<tr>
         | 
| 204 | 
            +
              		<td>1</td>
         | 
| 205 | 
            +
              		<td>2</td>
         | 
| 206 | 
            +
              		<td>3</td>
         | 
| 207 | 
            +
              	</tr>
         | 
| 208 | 
            +
              	<tr>
         | 
| 209 | 
            +
              		<td>1</td>
         | 
| 210 | 
            +
              		<td rowspan="3">2</td>
         | 
| 211 | 
            +
              		<td>3</td>
         | 
| 212 | 
            +
              	</tr>
         | 
| 213 | 
            +
              	<tr>
         | 
| 214 | 
            +
              		<td>1</td>
         | 
| 215 | 
            +
              		<td>3</td>
         | 
| 216 | 
            +
              	</tr>
         | 
| 217 | 
            +
              	<tr>
         | 
| 218 | 
            +
              		<td>1</td>
         | 
| 219 | 
            +
              		<td>3</td>
         | 
| 220 | 
            +
              	</tr>
         | 
| 221 | 
            +
              	<tr>
         | 
| 222 | 
            +
              		<td>1</td>
         | 
| 223 | 
            +
              		<td>2</td>
         | 
| 224 | 
            +
              		<td>3</td>
         | 
| 164 225 | 
             
              	</tr>
         | 
| 165 226 | 
             
              </table>
         | 
| 227 | 
            +
            latex: |+
         | 
| 228 | 
            +
              \begin{tabular}{ l l l }
         | 
| 229 | 
            +
                1 & 2 & 3 \\
         | 
| 230 | 
            +
                1 & \multirow{3}{*}{2} & 3 \\
         | 
| 231 | 
            +
                1 &  & 3 \\
         | 
| 232 | 
            +
                1 &  & 3 \\
         | 
| 233 | 
            +
                1 & 2 & 3 \\
         | 
| 234 | 
            +
              \end{tabular}
         | 
| 166 235 | 
             
            ---
         | 
| 167 236 | 
             
            in: |
         | 
| 168 237 | 
             
              {background:#ddd}. |S|Target|Complete|App|Milestone|
         | 
    
        data/test/test_custom_tags.rb
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            #!/usr/bin/env ruby
         | 
| 2 2 |  | 
| 3 | 
            -
            require 'helper'
         | 
| 3 | 
            +
            require File.join(File.dirname(__FILE__), 'helper')
         | 
| 4 4 |  | 
| 5 5 | 
             
            class TestCustomTags < Test::Unit::TestCase
         | 
| 6 6 |  | 
| @@ -43,4 +43,16 @@ class TestCustomTags < Test::Unit::TestCase | |
| 43 43 |  | 
| 44 44 | 
             
                assert_equal "<p>fig()>[no]{color:red}. 1.1 | img.jpg</p>", str
         | 
| 45 45 | 
             
              end
         | 
| 46 | 
            +
              
         | 
| 47 | 
            +
              # We don't want to call just any String method!
         | 
| 48 | 
            +
              def test_does_not_call_standard_methods
         | 
| 49 | 
            +
                r = RedCloth.new "next. "
         | 
| 50 | 
            +
                r.extend FigureTag
         | 
| 51 | 
            +
                str = r.to_html
         | 
| 52 | 
            +
             | 
| 53 | 
            +
                html  = "<p>next. </p>"
         | 
| 54 | 
            +
             | 
| 55 | 
            +
                assert_equal(html, str)
         | 
| 56 | 
            +
              end
         | 
| 57 | 
            +
              
         | 
| 46 58 | 
             
            end
         | 
    
        data/test/test_erb.rb
    CHANGED
    
    
    
        data/test/test_extensions.rb
    CHANGED
    
    
    
        data/test/test_formatters.rb
    CHANGED
    
    
    
        data/test/test_parser.rb
    CHANGED
    
    
    
        data/test/test_restrictions.rb
    CHANGED
    
    
    
        data/test/textism.yml
    CHANGED
    
    
    
        data/test/threshold.yml
    CHANGED
    
    
    
        data/test/validate_fixtures.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -5,9 +5,9 @@ homepage: http://redcloth.org | |
| 5 5 | 
             
            executables: 
         | 
| 6 6 | 
             
            - redcloth
         | 
| 7 7 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 8 | 
            -
              version: 4.1. | 
| 8 | 
            +
              version: 4.1.9
         | 
| 9 9 | 
             
            post_install_message: 
         | 
| 10 | 
            -
            date:  | 
| 10 | 
            +
            date: 2009-02-20 05:00:00 +00:00
         | 
| 11 11 | 
             
            files: 
         | 
| 12 12 | 
             
            - bin/redcloth
         | 
| 13 13 | 
             
            - CHANGELOG
         | 
| @@ -67,7 +67,7 @@ files: | |
| 67 67 | 
             
            - test/validate_fixtures.rb
         | 
| 68 68 | 
             
            - RedCloth.gemspec
         | 
| 69 69 | 
             
            - lib/redcloth_scan.jar
         | 
| 70 | 
            -
            rubygems_version: 1. | 
| 70 | 
            +
            rubygems_version: 1.3.1
         | 
| 71 71 | 
             
            rdoc_options: 
         | 
| 72 72 | 
             
            - --line-numbers
         | 
| 73 73 | 
             
            - --inline-source
         | 
| @@ -81,7 +81,7 @@ cert_chain: [] | |
| 81 81 | 
             
            name: RedCloth
         | 
| 82 82 | 
             
            has_rdoc: true
         | 
| 83 83 | 
             
            platform: universal-java
         | 
| 84 | 
            -
            summary: RedCloth-4.1. | 
| 84 | 
            +
            summary: RedCloth-4.1.9 - Textile parser for Ruby. http://redcloth.org/
         | 
| 85 85 | 
             
            default_executable: 
         | 
| 86 86 | 
             
            bindir: bin
         | 
| 87 87 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| @@ -108,18 +108,9 @@ test_files: | |
| 108 108 | 
             
            - test/test_formatters.rb
         | 
| 109 109 | 
             
            - test/test_parser.rb
         | 
| 110 110 | 
             
            - test/test_restrictions.rb
         | 
| 111 | 
            -
            dependencies: 
         | 
| 112 | 
            -
             | 
| 113 | 
            -
             | 
| 114 | 
            -
              name: echoe
         | 
| 115 | 
            -
              version_requirement: 
         | 
| 116 | 
            -
              version_requirements: !ruby/object:Gem::Requirement 
         | 
| 117 | 
            -
                version: 
         | 
| 118 | 
            -
                requirements: 
         | 
| 119 | 
            -
                - - '>='
         | 
| 120 | 
            -
                  - !ruby/object:Gem::Version 
         | 
| 121 | 
            -
                    version: "0"
         | 
| 122 | 
            -
            description: RedCloth-4.1.1 - Textile parser for Ruby. http://redcloth.org/
         | 
| 111 | 
            +
            dependencies: []
         | 
| 112 | 
            +
             | 
| 113 | 
            +
            description: RedCloth-4.1.9 - Textile parser for Ruby. http://redcloth.org/
         | 
| 123 114 | 
             
            email: redcloth-upwards@rubyforge.org
         | 
| 124 115 | 
             
            authors: 
         | 
| 125 116 | 
             
            - Jason Garber
         |