Merge pull request #5031 from tk0miya/fix_tag_for_oldstyled_javascript

Fix script tag for old styled JS file
This commit is contained in:
Takeshi KOMIYA 2018-06-06 01:08:45 +09:00 committed by GitHub
commit 509a2010b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1524,6 +1524,7 @@ def setup_js_tag_helper(app, pagename, templatexname, context, doctree):
attrs.append('src="%s"' % pathto(js.filename, resource=True))
else:
# str value (old styled)
attrs.append('type="text/javascript"')
attrs.append('src="%s"' % pathto(js, resource=True))
return '<script %s></script>' % ' '.join(attrs)