markright v0.5.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: [], parser: Markright.Parsers.Generic],
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>"
Link to this section Summary
Functions
Callback implementation for Markright.Parser.to_ast/2
Link to this section Functions
Link to this function
to_ast(input, plume)
Callback implementation for Markright.Parser.to_ast/2
.