Skip to content

Commit

Permalink
Fix regression related to parsing and fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Mar 24, 2022
1 parent 52bca51 commit e8b0423
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion coloraide/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,5 @@ def parse_version(ver: str) -> Version:
return Version(major, minor, micro, release, pre, post, dev)


__version_info__ = Version(0, 14, 0, "final")
__version_info__ = Version(0, 14, 1, "final")
__version__ = __version_info__._get_canonical()
4 changes: 2 additions & 2 deletions coloraide/css/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,11 @@ def parse_css(
if value is not None:
return (value[:3], value[3]), m.end(0)
else:
return parse_rgb_channels(string[m.end(1) + 1:-1], cspace.BOUNDS), m.end(0)
return parse_rgb_channels(string[m.end(1) + 1:m.end(0) - 1], cspace.BOUNDS), m.end(0)
else:
m = CSS_MATCH[cspace.NAME].match(string, start)
if m is not None and (not fullmatch or m.end(0) == len(string)):
return parse_channels(string[m.end(1) + 1:-1], cspace.BOUNDS), m.end(0)
return parse_channels(string[m.end(1) + 1:m.end(0) - 1], cspace.BOUNDS), m.end(0)

# If we wanted to support per color matching of this format, we could enable this.
# It is much faster to generically match all `color(space ...)` instances and then
Expand Down
4 changes: 4 additions & 0 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.14.1

- **FIX**: Fix bug related to parsing strings without full matching.

## 0.14.0

!!! note
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ extra_css:
- assets/coloraide-extras/extra-477e18ad12.css
extra_javascript:
- https://cdn.jsdelivr.net/pyodide/v0.19.0/full/pyodide.js
- assets/coloraide-extras/extra-notebook.js
- assets/coloraide-extras/extra-notebook-05d155f8.js

extra:
social:
Expand Down

0 comments on commit e8b0423

Please sign in to comment.