From 5f670eca27de9f76fc47dcb5b80d131be547c5f4 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 17 Feb 2023 11:41:57 +0900 Subject: [PATCH] 4.1.0 --- ...e-pr1912-espace-hash-in-regex-ruby32.patch | 24 ------------------- rubygem-rouge.spec | 12 ++++------ sources | 4 ++-- 3 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 rubygem-rouge-pr1912-espace-hash-in-regex-ruby32.patch diff --git a/rubygem-rouge-pr1912-espace-hash-in-regex-ruby32.patch b/rubygem-rouge-pr1912-espace-hash-in-regex-ruby32.patch deleted file mode 100644 index a2a7055..0000000 --- a/rubygem-rouge-pr1912-espace-hash-in-regex-ruby32.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 97deb402cf670d6f0708ab583f1b7d769d477c0b Mon Sep 17 00:00:00 2001 -From: Tan Le -Date: Fri, 13 Jan 2023 17:31:18 +1100 -Subject: [PATCH 3/3] Escape character that causes parsing issue - -This ensures we escape `#` character to avoid parsing issue in Ruby 3.2. -This change is backward compatible with earlier versions. ---- - lib/rouge/lexers/ghc_cmm.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/rouge/lexers/ghc_cmm.rb b/lib/rouge/lexers/ghc_cmm.rb -index 481bf20f9..1bbfb6be0 100644 ---- a/lib/rouge/lexers/ghc_cmm.rb -+++ b/lib/rouge/lexers/ghc_cmm.rb -@@ -22,7 +22,7 @@ class GHCCmm < RegexLexer - ws = %r(\s|//.*?\n|/[*](?:[^*]|(?:[*][^/]))*[*]+/)mx - - # Make sure that this is not a preprocessor macro, e.g. `#if` or `#define`. -- id = %r((?!#[a-zA-Z])[\w#\$%_']+) -+ id = %r((?!\#[a-zA-Z])[\w#\$%_']+) - - complex_id = %r( - (?:[\w#$%_']|\(\)|\(,\)|\[\]|[0-9])* diff --git a/rubygem-rouge.spec b/rubygem-rouge.spec index df9d1c9..22f9dd5 100644 --- a/rubygem-rouge.spec +++ b/rubygem-rouge.spec @@ -1,8 +1,8 @@ %global gem_name rouge Name: rubygem-%{gem_name} -Version: 4.0.1 -Release: 3%{?dist} +Version: 4.1.0 +Release: 1%{?dist} Summary: Pure-ruby colorizer based on pygments License: MIT and BSD @@ -13,9 +13,6 @@ Source1: %{gem_name}-%{version}-test-missing-files.tar.gz Source2: rouge-create-missing-test-files.sh Source10: spec_helper_assert.rb Source11: bundler.rb -# https://github.com/rouge-ruby/rouge/pull/1912 -# Escape hash character in regex to avoid parsing issue in Ruby 3.2 -Patch0: %{name}-pr1912-espace-hash-in-regex-ruby32.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: help2man @@ -46,8 +43,6 @@ mkdir FAKE cp -a %{SOURCE11} FAKE/ cp -pa %{SOURCE10} spec/ -%patch0 -p1 - %build gem build %{gem_name}-%{version}.gemspec %gem_install @@ -104,6 +99,9 @@ find spec -name \*_spec.rb -print0 | \ %{gem_libdir}/%{gem_name}/demos %changelog +* Fri Feb 17 2023 Mamoru TASAKA - 4.1.0-1 +- 4.1.0 + * Sun Feb 12 2023 Mamoru TASAKA - 4.0.1-3 - Execute spec test provided by the upstream - Backport upstream patch for ruby32 regex issue with hash character diff --git a/sources b/sources index 70c048f..374004c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rouge-4.0.1.gem) = 49dc512e38b7109368ab827c5423174f5911b1c5a47257170b62c093041412abbefcf998b1e03bb2d994a2fb724eb8fb7868875bad440203b4203a31336b7108 -SHA512 (rouge-4.0.1-test-missing-files.tar.gz) = c906f60c3427b2d70cb621e9aa083713e1d242c3c221f932505d4307af1555775763b1795fb50563c44a7038651d6e20f27ec35c4d4a69202e583cbdb955efaf +SHA512 (rouge-4.1.0.gem) = 1cca7de91231f4252b5777e64b59a61fbde67d20c828cd2af64ca6c235da14bc4b07eeb673879a92b43e2fc21f681bc3b807b9df55963d1e233bbdc61ef79edb +SHA512 (rouge-4.1.0-test-missing-files.tar.gz) = f4c8ebd4b672b3b55ad95a9de56925d15e5988f2d16e1c232cd767791820f1a3f0d1589636d155e01242f5a93c073a5d1175d944cbc2aa8e017cfdea3f2cd5b7