diff options
| author | Georg Brandl <georg@python.org> | 2010-08-25 10:26:15 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-08-25 10:26:15 +0000 |
| commit | 1fcacc70b7a1e5e341dd211c1c5fa99c4d91d926 (patch) | |
| tree | 3088e87f2efc19ea25631d45c17f200e8706c11d /sphinx/application.py | |
| parent | 2fc131460c32f80df34dd14a54435da1caffa511 (diff) | |
| download | sphinx-1fcacc70b7a1e5e341dd211c1c5fa99c4d91d926.tar.gz | |
#513: Allow giving non-local URIs for JavaScript files, e.g. in the JSMath extension.
Diffstat (limited to 'sphinx/application.py')
| -rw-r--r-- | sphinx/application.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/application.py b/sphinx/application.py index 97778d3f..11f887da 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -456,8 +456,11 @@ class Sphinx(object): def add_javascript(self, filename): from sphinx.builders.html import StandaloneHTMLBuilder - StandaloneHTMLBuilder.script_files.append( - posixpath.join('_static', filename)) + if '://' in filename: + StandaloneHTMLBuilder.script_files.append(filename) + else: + StandaloneHTMLBuilder.script_files.append( + posixpath.join('_static', filename)) def add_stylesheet(self, filename): from sphinx.builders.html import StandaloneHTMLBuilder |
