[motorola-security] Add auto method (#475)
Based on https://gist.github.com/ab/67c6343530c6b8e599f07cedccbcba3d. Closes #277.
This commit is contained in:
@@ -133,4 +133,5 @@ def to_identifier(s: str) -> str:
|
||||
"""Convert a string to a valid endoflife.date identifier."""
|
||||
identifier = s.strip().lower()
|
||||
identifier = identifier.replace(" ", "-")
|
||||
identifier = re.sub(r"-+", "-", identifier)
|
||||
return re.sub(r"[^a-z0-9.\-+_]", "", identifier)
|
||||
|
||||
Reference in New Issue
Block a user