mirror of
https://github.com/go-shiori/shiori.git
synced 2025-02-22 23:14:02 +08:00
Minor doc fix
This commit is contained in:
parent
a698470ffb
commit
9b97bd8759
1 changed files with 3 additions and 5 deletions
|
@ -431,11 +431,9 @@ func processJS(input io.Reader, baseURL *nurl.URL) (string, []ResourceURL) {
|
||||||
|
|
||||||
// Process the string.
|
// Process the string.
|
||||||
// Unlike CSS, JS doesn't have it's own URL token. So, we can only guess whether
|
// Unlike CSS, JS doesn't have it's own URL token. So, we can only guess whether
|
||||||
// a string is URL or not. There are three criteria to decide if it's URL :
|
// a string is URL or not. For simplicity, we only catch those that wrapped in `url()`
|
||||||
// - It started with http(s):// for absolute URL
|
// because it's usually CSS resource which downloaded via JS. However,
|
||||||
// - It started with slash (/) for relative URL
|
// if it doesn't fulfill the criteria above, just write it as it is.
|
||||||
// - It surrounded by `url()` just like CSS
|
|
||||||
// If it doesn't fulfill any of criteria above, just write it as it is.
|
|
||||||
var res ResourceURL
|
var res ResourceURL
|
||||||
var newURL string
|
var newURL string
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue