markright v0.4.1 Markright.Parsers.Youtube
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: []],
fun: nil, tail: ""}
iex> "✇http://www.youtube.com/embed/noQcPIeW6tE"
...> |> Markright.to_ast()
...> |> XmlBuilder.generate()
"<article>\n\t<p>\n\t\t<iframe allowfullscreen=\"\" frameborder=\"0\" height=\"315\" src=\"http://www.youtube.com/embed/noQcPIeW6tE\" width=\"560\">http://www.youtube.com/embed/noQcPIeW6tE</iframe>\n\t</p>\n</article>"
Summary
Functions
Callback implementation for Markright.Parser.to_ast/2
Functions
Callback implementation for Markright.Parser.to_ast/2
.