source tag with arguments not recognized #308

Closed
mrryanjohnston opened this Issue Aug 27, 2011 · 4 comments

Comments

Projects
None yet
4 participants

I'd like to do the following in order to insert audio into a page:

  audio
    source(src='sounds/boop.mp3' type='audio/mpeg')
    source(src='sounds/boop.wav' type='audio/wav')
    Your browser does not support the audio element.

However, jade sends a syntax error:
500 SyntaxError: Unexpected identifier
at Object.Function (unknown source)

Should render like so:

<audio controls preload="auto" autobuffer> 
  <source src="elvis.mp3" />
  <source src="elvis.ogg" />
</audio>
Contributor

tj commented Aug 27, 2011


html
  audio(preload="auto", autobuffer, controls)
    source(src="foo")
    source(src="bar")
<html>
  <audio preload="auto" autobuffer="autobuffer" controls="controls">
    <source src="foo"></source>
    <source src="bar"></source>
  </audio>
</html>

michela commented Oct 10, 2011

My jade rendered audio tags work in a number of browsers but don't not pass the W3 Validator tests

Getting "Stray end tag source" even though they appear to be matched in the source. Wondering if parser is requiring

<source ... />

Jade:

audio(
    id="done",
    preload="auto"
)
    source(src="/audio/done.mp3")
    source(src="/audio/done.ogg")

Rendered as:

<audio id="done" preload="auto"><source src="/audio/done.mp3"></source><source src="/audio/done.ogg"></source></audio>

Same happening to me but on video tag

tj closed this in dc99938 Apr 4, 2012

Contributor

tj commented Apr 4, 2012

gah lol silly html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment