Mercurial > hgrepos > Python2 > PyMuPDF
diff src/__init__.py @ 22:d77477b4e151
Let _int_rc() also handle (i.e. ignore) a local version suffix
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 19 Sep 2025 12:05:57 +0200 |
| parents | 1d09e1dec1d9 |
| children | 3b13504f9d89 |
line wrap: on
line diff
--- a/src/__init__.py Fri Sep 19 10:28:53 2025 +0200 +++ b/src/__init__.py Fri Sep 19 12:05:57 2025 +0200 @@ -366,8 +366,12 @@ def _int_rc(text): ''' - Converts string to int, ignoring trailing 'rc...'. - ''' + Converts string to int, ignoring trailing 'rc...' and a trailing + local version. + ''' + rc = text.find('+') + if rc >= 0: + text = text[:rc] rc = text.find('rc') if rc >= 0: text = text[:rc]
