markright v0.2.0 Markright.Helpers.Magnet

Generic handler for magnets. Use as:

defmodule Markright.Parsers.Maillink do
  use Markright.Helpers.Magnet magnet: "mailto:", tag: :a, attr: :href

  # the below code is redundant, this functions is generated by `use`,
  #   the snippet is here to provide a how-to, since `to_ast/3` is overridable
  def to_ast(input, fun \\ nil, opts \\ %{}) \
    when is_binary(input) and (is_nil(fun) or is_function(fun)) and is_map(opts),
  do: astify(input, fun)
end

NYI: This file also declares all default magnets. FIXME TODO