mirror of
https://github.com/rlespinasse/slugify-value.git
synced 2026-06-13 10:01:28 +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
|
name: Slugify Value
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v1.x
|
||||||
|
pull_request:
|
||||||
jobs:
|
jobs:
|
||||||
os-testing:
|
os-testing:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
slug() {
|
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"
|
reduce "$output"
|
||||||
}
|
}
|
||||||
|
|
||||||
slug_url() {
|
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"
|
reduce "$output"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user