Skip to content

Commit

Permalink
Release version 0.0.0.dev69
Browse files Browse the repository at this point in the history
  • Loading branch information
AAriam committed Jan 4, 2025
1 parent 658bf0d commit 2d0b8af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ namespaces = true
# ----------------------------------------- Project Metadata -------------------------------------
#
[project]
version = "0.0.0.dev68"
version = "0.0.0.dev69"
name = "PyLinks"
dependencies = [
"requests >= 2.31.0, < 3",
"ExceptionMan == 0.0.0.dev55",
"MDit == 0.0.0.dev55",
"ExceptionMan == 0.0.0.dev56",
"MDit == 0.0.0.dev56",
]
requires-python = ">=3.10"

4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
requests >= 2.31.0, < 3
ExceptionMan == 0.0.0.dev55
MDit == 0.0.0.dev55
ExceptionMan == 0.0.0.dev56
MDit == 0.0.0.dev56
6 changes: 4 additions & 2 deletions src/pylinks/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unicodedata as _unicodedata


def to_slug(string: str) -> str:
def to_slug(string: str, reduce: bool = True) -> str:
"""Convert a string to a URL-friendly slug.
This function performs unicode-normalization on the string,
Expand All @@ -17,7 +17,9 @@ def to_slug(string: str) -> str:
# Decode back to a string
ascii_string = ascii_bytes.decode('ascii')
lower_case_string = ascii_string.lower()
return _re.sub(r'[^a-z0-9]+', '-', lower_case_string).strip('-')
if reduce:
return _re.sub(r'[^a-z0-9]+', '-', lower_case_string).strip('-')
return _re.sub(r'[^a-z0-9]', '-', lower_case_string)


def camel_to_title(string: str) -> str:
Expand Down

0 comments on commit 2d0b8af

Please sign in to comment.