Skip to content

Commit 76f3e47

Browse files
committed
Fix version badge
1 parent 326f55a commit 76f3e47

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Build](https://github.com/ltrzesniewski/pcre-net/workflows/Build/badge.svg)](https://github.com/ltrzesniewski/pcre-net/actions?query=workflow%3ABuild)
66
[![NuGet Package](https://img.shields.io/nuget/v/PCRE.NET.svg?logo=NuGet)](https://www.nuget.org/packages/PCRE.NET)
77
[![GitHub release](https://img.shields.io/github/release/ltrzesniewski/pcre-net.svg?logo=GitHub)](https://github.com/ltrzesniewski/pcre-net/releases)
8-
[![PCRE2](https://img.shields.io/badge/pcre2-v10.43-RC1-blue.svg)](https://github.com/PCRE2Project/pcre2)
8+
[![PCRE2](https://img.shields.io/badge/pcre2-v10.43--RC1-blue.svg)](https://github.com/PCRE2Project/pcre2)
99
[![License](https://img.shields.io/badge/license-BSD-blue.svg)](https://github.com/ltrzesniewski/pcre-net/blob/master/LICENCE)
1010
<br clear="right" />
1111

src/PCRE.NET.Tests/PcreNet/DocumentationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ static string NormalizeVersion(string version)
4141
public void should_have_correct_pcre_version_badge_in_readme()
4242
{
4343
var readmeText = File.ReadAllText(Path.Combine(Path.GetDirectoryName(typeof(DocumentationTests).Assembly.Location)!, "README.md"));
44-
var match = Regex.Match(readmeText, @"https://img\.shields\.io/badge/pcre2-v(?<pcreVersion>[\d.]+(?:-RC\d+)?)-blue\.svg", RegexOptions.CultureInvariant);
44+
var match = Regex.Match(readmeText, @"https://img\.shields\.io/badge/pcre2-v(?<pcreVersion>[\d.]+(?:--RC\d+)?)-blue\.svg", RegexOptions.CultureInvariant);
4545

4646
Assert.That(match.Success);
47-
Assert.That(NormalizeVersion(match.Groups["pcreVersion"].Value), Is.EqualTo(NormalizeVersion(PcreBuildInfo.Version.Split(' ')[0])));
47+
Assert.That(NormalizeVersion(match.Groups["pcreVersion"].Value.Replace("--", "-")), Is.EqualTo(NormalizeVersion(PcreBuildInfo.Version.Split(' ')[0])));
4848

4949
static string NormalizeVersion(string version)
5050
=> Regex.Replace(version, @"(?:\.0)+$", string.Empty);

0 commit comments

Comments
 (0)