Markright.Parsers.Youtube (markright v0.7.1)

Parses the input for the youtube video.

Examples

iex> input = "✇https://www.youtube.com/watch?v=noQcPIeW6tE&size=5"
iex> Markright.Parsers.Youtube.to_ast(input)
%Markright.Continuation{ast: {:iframe,
       %{allowfullscreen: nil, frameborder: 0, height: 315,
         src: "http://www.youtube.com/embed/noQcPIeW6tE", width: 560},
       "http://www.youtube.com/embed/noQcPIeW6tE"},
      bag: [tags: [], parser: Markright.Parsers.Generic],
      fun: nil, tail: ""}

iex> "✇http://www.youtube.com/embed/noQcPIeW6tE"
...> |> Markright.to_ast()
...> |> XmlBuilder.generate(format: :none)
"<article><p><iframe allowfullscreen=\"\" frameborder=\"0\" height=\"315\" src=\"http://www.youtube.com/embed/noQcPIeW6tE\" width=\"560\">http://www.youtube.com/embed/noQcPIeW6tE</iframe></p></article>"

Link to this section Summary

Link to this section Functions

Link to this function

to_ast(input, plume)

Callback implementation for Markright.Parser.to_ast/2.