Crawler.Linker.PathPrefixer (Crawler v1.1.2) View Source

Returns prefixes (../s) according to the given URL's structure.

Link to this section Summary

Functions

Returns prefixes (../s) according to the given URL's structure.

Link to this section Functions

Returns prefixes (../s) according to the given URL's structure.

Examples

iex> PathPrefixer.prefix("https://hello.world/")
"../"

iex> PathPrefixer.prefix("https://hello.world/page.html")
"../"

iex> PathPrefixer.prefix("https://hello.world/page")
"../../"

iex> PathPrefixer.prefix("https://hello.world/dir/page.html")
"../../"

iex> PathPrefixer.prefix("https://hello.world/dir/page")
"../../../"