feat: new default style and more
All checks were successful
Lint / shellcheck (push) Successful in 20s
All checks were successful
Lint / shellcheck (push) Successful in 20s
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
function replace_all(text, token, value, pos, token_len) {
|
||||
function replace_all(text, token, value, pos, token_len, res) {
|
||||
token_len = length(token)
|
||||
res = ""
|
||||
while ((pos = index(text, token)) > 0) {
|
||||
text = substr(text, 1, pos - 1) value substr(text, pos + token_len)
|
||||
res = res substr(text, 1, pos - 1) value
|
||||
text = substr(text, pos + token_len)
|
||||
}
|
||||
return res text
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
if (current_url != "") {
|
||||
nav = replace_all(nav, "href=\"" current_url "\"", "href=\"" current_url "\" class=\"current-page\"")
|
||||
}
|
||||
return text
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user