Commit cfc6355b authored by minibikini's avatar minibikini 😷

fix link text

parent d6a03182
...@@ -6,15 +6,15 @@ defmodule AutoLinker.Builder do ...@@ -6,15 +6,15 @@ defmodule AutoLinker.Builder do
@doc """ @doc """
Create a link. Create a link.
""" """
def create_link(url, opts) do def create_link(text, opts) do
url = add_scheme(url) url = add_scheme(text)
[] []
|> build_attrs(url, opts, :rel) |> build_attrs(url, opts, :rel)
|> build_attrs(url, opts, :target) |> build_attrs(url, opts, :target)
|> build_attrs(url, opts, :class) |> build_attrs(url, opts, :class)
|> build_attrs(url, opts, :href) |> build_attrs(url, opts, :href)
|> format_url(url, opts) |> format_url(text, opts)
end end
def create_markdown_links(text, opts) do def create_markdown_links(text, opts) do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment