yosssi / ace

HTML template engine for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is `script defer` broken...?

jpap opened this issue · comments

Using the defer keyword in a script definition as follows,

script defer src="script.js" type="text/javascript"

renders incorrectly,

<script>defer src="script.js" type="text/javascript"</script>

which should instead be

<script defer src="script.js" type="text/javascript"></script>

.

Further, if you place the defer keyword at the end, Ace thinks that it is the script. The code

script src="script.js" type="text/javascript" defer

renders incorrectly as

<script src="script.js" type="text/javascript">defer</script>

when it should be

<script src="script.js" type="text/javascript" defer></script>

.

Curiously, if I write,

script defer="" src="script.js" type="text/javascript"

then it renders correctly, and without the ="" part too.

Is this by design? If so, it would be great to include in the documentation!