mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-31 20:32:25 -05:00
[chore]: Bump github.com/tdewolff/minify/v2 from 2.12.4 to 2.12.5 (#1649)
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.12.4 to 2.12.5. - [Release notes](https://github.com/tdewolff/minify/releases) - [Commits](https://github.com/tdewolff/minify/compare/v2.12.4...v2.12.5) --- updated-dependencies: - dependency-name: github.com/tdewolff/minify/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
1603a7fd48
commit
9e1756ce8b
8 changed files with 30 additions and 28 deletions
15
vendor/github.com/tdewolff/minify/v2/common.go
generated
vendored
15
vendor/github.com/tdewolff/minify/v2/common.go
generated
vendored
|
|
@ -18,11 +18,11 @@ var (
|
|||
// Epsilon is the closest number to zero that is not considered to be zero.
|
||||
var Epsilon = 0.00001
|
||||
|
||||
// Mediatype minifies a given mediatype by removing all whitespace.
|
||||
// Mediatype minifies a given mediatype by removing all whitespace and lowercasing all parts except strings (which may be case sensitive).
|
||||
func Mediatype(b []byte) []byte {
|
||||
j := 0
|
||||
start := 0
|
||||
inString := false
|
||||
start, lastString := 0, 0
|
||||
for i, c := range b {
|
||||
if !inString && parse.IsWhitespace(c) {
|
||||
if start != 0 {
|
||||
|
|
@ -33,13 +33,20 @@ func Mediatype(b []byte) []byte {
|
|||
start = i + 1
|
||||
} else if c == '"' {
|
||||
inString = !inString
|
||||
if inString {
|
||||
parse.ToLower(b[lastString:i])
|
||||
} else {
|
||||
lastString = j + (i + 1 - start)
|
||||
}
|
||||
}
|
||||
}
|
||||
if start != 0 {
|
||||
j += copy(b[j:], b[start:])
|
||||
return parse.ToLower(b[:j])
|
||||
parse.ToLower(b[lastString:j])
|
||||
return b[:j]
|
||||
}
|
||||
return parse.ToLower(b)
|
||||
parse.ToLower(b[lastString:])
|
||||
return b
|
||||
}
|
||||
|
||||
// DataURI minifies a data URI and calls a minifier by the specified mediatype. Specifications: https://www.ietf.org/rfc/rfc2397.txt.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue