mirror of
https://github.com/rlespinasse/slugify-value.git
synced 2026-05-17 18:25:47 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce66c2e7e3 | ||
|
|
ca7a5a0fdd |
6
.github/workflows/slugify-value.yaml
vendored
6
.github/workflows/slugify-value.yaml
vendored
@@ -1,5 +1,9 @@
|
||||
name: Slugify Value
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v1.x
|
||||
pull_request:
|
||||
jobs:
|
||||
os-testing:
|
||||
strategy:
|
||||
|
||||
@@ -28,12 +28,12 @@ else
|
||||
fi
|
||||
|
||||
slug() {
|
||||
output=$(sed -E 's#refs/[^\/]*/##;s/[^a-zA-Z0-9._]+/-/g;s/-+/-/g;s/^-*//;s/-*$//' <<<"$1")
|
||||
output=$(sed -E 's#refs/[^\/]*/##;s/[^a-zA-Z0-9._-]+/-/g;s/-+/-/g;s/^-*//;s/-*$//' <<<"$1")
|
||||
reduce "$output"
|
||||
}
|
||||
|
||||
slug_url() {
|
||||
output=$(sed -E 's#refs/[^\/]*/##;s/[^a-zA-Z0-9_]+/-/g;s/-+/-/g;s/^-*//;s/-*$//' <<<"$1")
|
||||
output=$(sed -E 's#refs/[^\/]*/##;s/[^a-zA-Z0-9_-]+/-/g;s/-+/-/g;s/^-*//;s/-*$//' <<<"$1")
|
||||
reduce "$output"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user