[kramdown-users] <audio> and <video> tags

Elliot Winkler elliot.winkler at gmail.com
Tue Dec 14 01:16:37 EST 2010


Okay, after playing with it a bit more, though, I realized I'd forgotten
that kramdown parses XHTML and not HTML. I had this

  <audio src="..." controls>...</audio>

which kramdown didn't recognize as a valid tag, so it bailed and ended up
escaping the angle brackets. This, of course, is the solution:

  <audio src="..." controls="controls">...</audio>

Out of curiosity, has kramdown always allowed "foreign" tags (meaning ones
it doesn't have special methods in the parser for) to come through?

-- Elliot

On Mon, Dec 13, 2010 at 1:03 AM, Thomas Leitner <t_leitner at gmx.at> wrote:

> Hi,
>
> On 2010-12-12 19:24 -0700 Elliot Winkler wrote:
> > I wanted to put some audio in an entry on my blog (which uses
> > Kramdown), but it looks like Kramdown doesn't support either <audio>
> > (or <video>, for that matter). I tried to make a patch by adding the
> > tags to HTML_PARSE_AS_BLOCK and HTML_BLOCK_ELEMENTS, but it didn't
> > seem to work. What am I missing here?
>
> could you state more precisely what doesn't work? I.e. the input and
> the expected output?
>
> For example, the following input
>
>    this is <audio>tag</audio> doit
>
>    <audio>
>    this is some
>    </audio>
>
>
> yields this output when using kramdown 0.12.0
>
>    <p>this is <audio>tag</audio> doit</p>
>
>    <audio>
>    this is some
>    </audio>
>
> This output seems to be correct for me...
>
> -- Thomas
> _______________________________________________
> kramdown-users mailing list
> kramdown-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/kramdown-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/kramdown-users/attachments/20101213/8d429e99/attachment-0001.html>


More information about the kramdown-users mailing list