Dust.Parsers.URI (Dust v0.0.2-dev) View Source

Parse document and returl all links/URIs to styles with absolute urls.

Link to this section Summary

Link to this section Functions

Link to this function

expand(request_url, relative_path)

View Source

Specs

expand(String.t(), String.t()) :: String.t()

Expands relative urls to absolute urls and augments things like

  protocol https
    -> // -> https://..

  relative paths
  ../../../some.css => example.com/styles/some.css

We also take care about default scheme which is https if relative_path starts with //example.com/my/awesome/style

Link to this function

get_base_url(uri, domain \\ true)

View Source
Link to this function

normalize(url, as_string \\ false)

View Source

Specs

parse(String.t()) :: [String.t()]

Extract all CSS url(...) links