RedCloth 4.3.3 → 4.3.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG +8 -0
- data/README.rdoc +3 -5
- data/ext/redcloth_scan/extconf.rb +0 -1
- data/lib/redcloth/version.rb +2 -2
- data/lib/redcloth.rb +5 -0
- data/redcloth.gemspec +13 -8
- data/spec/custom_tags_spec.rb +3 -3
- data/spec/erb_spec.rb +1 -1
- data/spec/extension_spec.rb +1 -1
- data/spec/formatters/html_spec.rb +2 -2
- data/spec/formatters/latex_spec.rb +2 -2
- data/spec/parser_spec.rb +4 -4
- data/spec/spec_helper.rb +2 -2
- data/tasks/compile.rake +0 -1
- metadata +11 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 3bf6223596d141287ffe67bb0321d0cb329110cf056730a6a88072123e61eb23
         | 
| 4 | 
            +
              data.tar.gz: 66e55aa28a5fd6d69e9140fc822e9b299bd8fd8b68747cbb61b1322e1686774d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 330980e516cd9966d6860e92ca917d102c9957635bdf76869774a8b8893d372da7aeca4f5d69da3a8db6d98b3c2d8f97f5628f9c96309e34ea424503fbcdb40a
         | 
| 7 | 
            +
              data.tar.gz: c1614dce1f131bed42fed09cef9e4679ef0d7f49868548d355ce1ee5d2753dd64f9c7e172e70d90a838464f70653c78f9e91e149f22909a6eadd63305969593e
         | 
    
        data/CHANGELOG
    CHANGED
    
    | @@ -1,8 +1,16 @@ | |
| 1 | 
            +
            == 4.3.4 / Mar 13th, 2024
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            * A round of cleanups [Helio Cola]
         | 
| 4 | 
            +
            * Stop checking for main function in libc [Jean byroot Boussier]
         | 
| 5 | 
            +
            * Update maintainer, scrub redcloth.org [Jason Garber]
         | 
| 6 | 
            +
            * Add GitHub action [Anton Maminov]
         | 
| 7 | 
            +
             | 
| 1 8 | 
             
            == 4.3.3 / Nov 2nd, 2023
         | 
| 2 9 |  | 
| 3 10 | 
             
            * Add tests for CVE-2023-31606 [Helio Cola]
         | 
| 4 11 | 
             
            * Fix rake compile [Helio Cola and Faria Education Group]
         | 
| 5 12 | 
             
            * Fix CVE-2023-31606 (ReDOS possible in the sanitize_html function) [Kornelius Kalnbach and Merbin Russel]
         | 
| 13 | 
            +
            * Immutable strings [Matijs van Zuijlen]
         | 
| 6 14 |  | 
| 7 15 | 
             
            == 4.3.2 / May 23rd, 2016
         | 
| 8 16 |  | 
    
        data/README.rdoc
    CHANGED
    
    | @@ -1,14 +1,12 @@ | |
| 1 1 | 
             
            = RedCloth - Textile parser for Ruby
         | 
| 2 2 |  | 
| 3 | 
            -
            Homepage::   | 
| 4 | 
            -
            Maintainer::  | 
| 3 | 
            +
            Homepage::  https://github.com/jgarber/redcloth
         | 
| 4 | 
            +
            Maintainer:: Helio Cola https://github.com/heliocola
         | 
| 5 5 | 
             
            Author::    Jason Garber
         | 
| 6 6 | 
             
            Copyright:: (c) 2011 Jason Garber
         | 
| 7 7 | 
             
            License::   MIT
         | 
| 8 8 |  | 
| 9 | 
            -
            { | 
| 10 | 
            -
             | 
| 11 | 
            -
            (See http://redcloth.org/textile/ for a Textile reference.)
         | 
| 9 | 
            +
            {rdoc-image:https://codeclimate.com/github/jgarber/redcloth/badges/gpa.svg}[https://codeclimate.com/github/jgarber/redcloth]
         | 
| 12 10 |  | 
| 13 11 | 
             
            = RedCloth
         | 
| 14 12 |  | 
    
        data/lib/redcloth/version.rb
    CHANGED
    
    | @@ -2,7 +2,7 @@ module RedCloth | |
| 2 2 | 
             
              module VERSION
         | 
| 3 3 | 
             
                MAJOR = 4
         | 
| 4 4 | 
             
                MINOR = 3
         | 
| 5 | 
            -
                TINY  =  | 
| 5 | 
            +
                TINY  = 4
         | 
| 6 6 | 
             
            #    RELEASE_CANDIDATE = 0
         | 
| 7 7 |  | 
| 8 8 | 
             
                STRING = [MAJOR, MINOR, TINY].compact.join('.')
         | 
| @@ -22,7 +22,7 @@ module RedCloth | |
| 22 22 |  | 
| 23 23 | 
             
              NAME = "RedCloth"
         | 
| 24 24 | 
             
              GEM_NAME = NAME
         | 
| 25 | 
            -
              URL  = " | 
| 25 | 
            +
              URL  = "https://github.com/jgarber/redcloth"
         | 
| 26 26 | 
             
              description = "Textile parser for Ruby."
         | 
| 27 27 |  | 
| 28 28 | 
             
              if RedCloth.const_defined?(:EXTENSION_LANGUAGE)
         | 
    
        data/lib/redcloth.rb
    CHANGED
    
    | @@ -10,6 +10,11 @@ begin | |
| 10 10 | 
             
              conf = Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG
         | 
| 11 11 | 
             
              prefix = conf['arch'] =~ /mswin|mingw/ ? "#{conf['MAJOR']}.#{conf['MINOR']}/" : ''
         | 
| 12 12 | 
             
              lib = "#{prefix}redcloth_scan"
         | 
| 13 | 
            +
              begin 
         | 
| 14 | 
            +
                require lib
         | 
| 15 | 
            +
              rescue LoadError => e
         | 
| 16 | 
            +
                lib = "redcloth_scan"
         | 
| 17 | 
            +
              end
         | 
| 13 18 | 
             
              require lib
         | 
| 14 19 | 
             
            rescue LoadError => e
         | 
| 15 20 | 
             
              e.message << %{\nCouldn't load #{lib}\nThe $LOAD_PATH was:\n#{$LOAD_PATH.join("\n")}}
         | 
    
        data/redcloth.gemspec
    CHANGED
    
    | @@ -9,12 +9,20 @@ Gem::Specification.new do |s| | |
| 9 9 | 
             
              s.authors     = ["Jason Garber", "Joshua Siler", "Ola Bini"]
         | 
| 10 10 | 
             
              s.description = "Textile parser for Ruby."
         | 
| 11 11 | 
             
              s.summary     = RedCloth::SUMMARY
         | 
| 12 | 
            -
              s. | 
| 13 | 
            -
              s. | 
| 14 | 
            -
              s.rubyforge_project = "redcloth"
         | 
| 12 | 
            +
              s.homepage    = "https://github.com/jgarber/redcloth"
         | 
| 13 | 
            +
              s.license = "MIT"
         | 
| 15 14 |  | 
| 15 | 
            +
              s.platform = 'ruby'
         | 
| 16 | 
            +
              s.required_ruby_version = Gem::Requirement.new(">= 2.4")
         | 
| 16 17 | 
             
              s.rubygems_version   = "1.3.7"
         | 
| 17 | 
            -
             | 
| 18 | 
            +
             | 
| 19 | 
            +
              if s.respond_to?(:metadata=)
         | 
| 20 | 
            +
                s.metadata = {
         | 
| 21 | 
            +
                  "bug_tracker_uri" => "https://github.com/jgarber/redcloth/issues",
         | 
| 22 | 
            +
                  "changelog_uri" => "https://github.com/jgarber/redcloth/blob/master/CHANGELOG",
         | 
| 23 | 
            +
                  "source_code_uri" => "https://github.com/jgarber/redcloth"
         | 
| 24 | 
            +
                }
         | 
| 25 | 
            +
              end
         | 
| 18 26 |  | 
| 19 27 | 
             
              s.files            = Dir['.gemtest', '.rspec', 'CHANGELOG', 'COPYING', 'Gemfile', 'README.rdoc', 'Rakefile', 'doc/**/*', 'bin/**/*', 'lib/**/*', 'redcloth.gemspec', 'spec/**/*', 'tasks/**/*']
         | 
| 20 28 | 
             
              s.test_files       = Dir['spec/**/*']
         | 
| @@ -26,8 +34,6 @@ Gem::Specification.new do |s| | |
| 26 34 | 
             
              s.files -= Dir['lib/**/*.bundle']
         | 
| 27 35 | 
             
              s.files -= Dir['lib/**/*.so']
         | 
| 28 36 |  | 
| 29 | 
            -
              s.platform = 'ruby'
         | 
| 30 | 
            -
              
         | 
| 31 37 | 
             
              s.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"}
         | 
| 32 38 | 
             
              s.files += ["ext/redcloth_scan/redcloth.h"]
         | 
| 33 39 | 
             
              s.extensions = Dir['ext/**/extconf.rb']
         | 
| @@ -37,5 +43,4 @@ Gem::Specification.new do |s| | |
| 37 43 | 
             
              s.add_development_dependency('rspec', '~> 3.12')
         | 
| 38 44 | 
             
              s.add_development_dependency('diff-lcs', '~> 1.5')
         | 
| 39 45 |  | 
| 40 | 
            -
             | 
| 41 | 
            -
            end
         | 
| 46 | 
            +
            end
         | 
    
        data/spec/custom_tags_spec.rb
    CHANGED
    
    | @@ -30,13 +30,13 @@ describe "custom tags" do | |
| 30 30 | 
             
                html << %Q{<div>\n}
         | 
| 31 31 | 
             
                html << %Q{<p>The last line of text.</p>}
         | 
| 32 32 |  | 
| 33 | 
            -
                r.to_html. | 
| 33 | 
            +
                expect(r.to_html).to eq(html)
         | 
| 34 34 | 
             
              end
         | 
| 35 35 |  | 
| 36 36 | 
             
              it "should fall back if custom tag isn't defined" do
         | 
| 37 37 | 
             
                r = RedCloth.new %Q/fig()>[no]{color:red}. 1.1 | img.jpg/
         | 
| 38 38 |  | 
| 39 | 
            -
                r.to_html. | 
| 39 | 
            +
                expect(r.to_html).to eq("<p>fig()>[no]{color:red}. 1.1 | img.jpg</p>")
         | 
| 40 40 | 
             
              end
         | 
| 41 41 |  | 
| 42 42 | 
             
              it "should not call just regular string methods" do
         | 
| @@ -45,6 +45,6 @@ describe "custom tags" do | |
| 45 45 |  | 
| 46 46 | 
             
                html  = "<p>next. </p>"
         | 
| 47 47 |  | 
| 48 | 
            -
                r.to_html. | 
| 48 | 
            +
                expect(r.to_html).to eq(html)
         | 
| 49 49 | 
             
              end
         | 
| 50 50 | 
             
            end
         | 
    
        data/spec/erb_spec.rb
    CHANGED
    
    | @@ -5,6 +5,6 @@ describe "ERB helper" do | |
| 5 5 | 
             
                template = %{<%=t "This new ERB tag makes is so _easy_ to use *RedCloth*" %>}
         | 
| 6 6 | 
             
                expected = %{<p>This new <span class="caps">ERB</span> tag makes is so <em>easy</em> to use <strong>RedCloth</strong></p>}
         | 
| 7 7 |  | 
| 8 | 
            -
                ERB.new(template).result. | 
| 8 | 
            +
                expect(ERB.new(template).result).to eq(expected)
         | 
| 9 9 | 
             
              end
         | 
| 10 10 | 
             
            end
         | 
    
        data/spec/extension_spec.rb
    CHANGED
    
    | @@ -20,7 +20,7 @@ describe RedClothSmileyExtension do | |
| 20 20 |  | 
| 21 21 | 
             
                html  = %Q{<p>You’re so silly! <img src='/images/emoticons/58_80.png' title=':P' class='smiley' /></p>}
         | 
| 22 22 |  | 
| 23 | 
            -
                RedCloth.new(input).to_html(:textile, :refs_smiley). | 
| 23 | 
            +
                expect(RedCloth.new(input).to_html(:textile, :refs_smiley)).to eq(html)
         | 
| 24 24 | 
             
              end
         | 
| 25 25 |  | 
| 26 26 | 
             
            end
         | 
| @@ -6,8 +6,8 @@ describe "HTML" do | |
| 6 6 | 
             
              end
         | 
| 7 7 |  | 
| 8 8 | 
             
              it "should not raise an error when orphaned parentheses in a link are followed by punctuation and words in HTML" do
         | 
| 9 | 
            -
                 | 
| 9 | 
            +
                expect {
         | 
| 10 10 | 
             
                  RedCloth.new(%Q{Test "(read this":http://test.host), ok}).to_html
         | 
| 11 | 
            -
                }. | 
| 11 | 
            +
                }.not_to raise_error
         | 
| 12 12 | 
             
              end
         | 
| 13 13 | 
             
            end
         | 
| @@ -6,8 +6,8 @@ describe "LaTeX" do | |
| 6 6 | 
             
              end
         | 
| 7 7 |  | 
| 8 8 | 
             
              it "should not raise an error when orphaned parentheses in a link are followed by punctuation and words in LaTeX" do
         | 
| 9 | 
            -
                 | 
| 9 | 
            +
                expect { 
         | 
| 10 10 | 
             
                  RedCloth.new(%Q{Test "(read this":http://test.host), ok}).to_latex
         | 
| 11 | 
            -
                }. | 
| 11 | 
            +
                }.not_to raise_error
         | 
| 12 12 | 
             
              end
         | 
| 13 13 | 
             
            end
         | 
    
        data/spec/parser_spec.rb
    CHANGED
    
    | @@ -4,15 +4,15 @@ describe RedCloth do | |
| 4 4 |  | 
| 5 5 | 
             
              describe "#new" do
         | 
| 6 6 | 
             
                it "should accept options" do
         | 
| 7 | 
            -
                   | 
| 7 | 
            +
                  expect {
         | 
| 8 8 | 
             
                    RedCloth.new("test", [:hard_breaks])
         | 
| 9 | 
            -
                  }. | 
| 9 | 
            +
                  }.not_to raise_error
         | 
| 10 10 | 
             
                end
         | 
| 11 11 | 
             
              end
         | 
| 12 12 |  | 
| 13 13 | 
             
              it "should have a VERSION" do
         | 
| 14 | 
            -
                RedCloth.const_defined?("VERSION"). | 
| 15 | 
            -
                RedCloth::VERSION.const_defined?("STRING"). | 
| 14 | 
            +
                expect(RedCloth.const_defined?("VERSION")).to be_truthy
         | 
| 15 | 
            +
                expect(RedCloth::VERSION.const_defined?("STRING")).to be_truthy
         | 
| 16 16 | 
             
              end
         | 
| 17 17 |  | 
| 18 18 | 
             
              it "should show the version as a string" do
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -10,11 +10,11 @@ def examples_from_yaml(&block) | |
| 10 10 | 
             
                if doc[formatter]
         | 
| 11 11 | 
             
                  example("should output #{formatter} for #{name}") do
         | 
| 12 12 | 
             
                    output = method("format_as_#{formatter}").call(doc)
         | 
| 13 | 
            -
                    output. | 
| 13 | 
            +
                    expect(output).to eq(doc[formatter])
         | 
| 14 14 | 
             
                  end
         | 
| 15 15 | 
             
                else
         | 
| 16 16 | 
             
                  example("should not raise errors when rendering #{formatter} for #{name}") do
         | 
| 17 | 
            -
                     | 
| 17 | 
            +
                    expect { method("format_as_#{formatter}").call(doc) }.not_to raise_error
         | 
| 18 18 | 
             
                  end
         | 
| 19 19 | 
             
                end
         | 
| 20 20 | 
             
              end
         | 
    
        data/tasks/compile.rake
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: RedCloth
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 4.3. | 
| 4 | 
            +
              version: 4.3.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jason Garber
         | 
| @@ -10,7 +10,7 @@ authors: | |
| 10 10 | 
             
            autorequire:
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date:  | 
| 13 | 
            +
            date: 2024-03-13 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: bundler
         | 
| @@ -69,7 +69,7 @@ dependencies: | |
| 69 69 | 
             
                  - !ruby/object:Gem::Version
         | 
| 70 70 | 
             
                    version: '1.5'
         | 
| 71 71 | 
             
            description: Textile parser for Ruby.
         | 
| 72 | 
            -
            email: | 
| 72 | 
            +
            email:
         | 
| 73 73 | 
             
            executables:
         | 
| 74 74 | 
             
            - redcloth
         | 
| 75 75 | 
             
            extensions:
         | 
| @@ -143,10 +143,13 @@ files: | |
| 143 143 | 
             
            - tasks/release.rake
         | 
| 144 144 | 
             
            - tasks/rspec.rake
         | 
| 145 145 | 
             
            - tasks/rvm.rake
         | 
| 146 | 
            -
            homepage:  | 
| 146 | 
            +
            homepage: https://github.com/jgarber/redcloth
         | 
| 147 147 | 
             
            licenses:
         | 
| 148 148 | 
             
            - MIT
         | 
| 149 | 
            -
            metadata: | 
| 149 | 
            +
            metadata:
         | 
| 150 | 
            +
              bug_tracker_uri: https://github.com/jgarber/redcloth/issues
         | 
| 151 | 
            +
              changelog_uri: https://github.com/jgarber/redcloth/blob/master/CHANGELOG
         | 
| 152 | 
            +
              source_code_uri: https://github.com/jgarber/redcloth
         | 
| 150 153 | 
             
            post_install_message:
         | 
| 151 154 | 
             
            rdoc_options:
         | 
| 152 155 | 
             
            - "--charset=UTF-8"
         | 
| @@ -164,17 +167,17 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 164 167 | 
             
              requirements:
         | 
| 165 168 | 
             
              - - ">="
         | 
| 166 169 | 
             
                - !ruby/object:Gem::Version
         | 
| 167 | 
            -
                  version: ' | 
| 170 | 
            +
                  version: '2.4'
         | 
| 168 171 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 169 172 | 
             
              requirements:
         | 
| 170 173 | 
             
              - - ">="
         | 
| 171 174 | 
             
                - !ruby/object:Gem::Version
         | 
| 172 175 | 
             
                  version: '0'
         | 
| 173 176 | 
             
            requirements: []
         | 
| 174 | 
            -
            rubygems_version: 3. | 
| 177 | 
            +
            rubygems_version: 3.5.6
         | 
| 175 178 | 
             
            signing_key:
         | 
| 176 179 | 
             
            specification_version: 4
         | 
| 177 | 
            -
            summary: RedCloth-4.3. | 
| 180 | 
            +
            summary: RedCloth-4.3.4
         | 
| 178 181 | 
             
            test_files:
         | 
| 179 182 | 
             
            - spec/benchmark_spec.rb
         | 
| 180 183 | 
             
            - spec/custom_tags_spec.rb
         |