CanvasNative v1.0.3 CanvasNative.V0.ImageType

An image in a v0 canvas native document.

iex> source = wrap("image") <> "https://example.com"
iex> match_native(source)
%ImageType{content: "https://example.com", url: "https://example.com",
           metadata: %{}, type: "image",
           source: wrap("image") <> "https://example.com"}

Summary

Functions

Match a native string against @native_pattern, returning a struct or nil

Name for this type

Types

t :: %CanvasNative.V0.ImageType{content: String.t, metadata: %{optional(String.t) => String.t}, source: String.t, type: String.t, url: String.t}

Functions

match_markdown(markdown, ctx \\ %{has_title: false, in_code: false, last_line_blank: false})

Specs

Match a Markdown string and return a struct or nil.

match_native(native)

Specs

match_native(String.t) :: t | nil

Match a native string against @native_pattern, returning a struct or nil.

new(map)

Specs

new(map) :: t
type_name()

Specs

type_name :: String.t

Name for this type.