mirror of
https://github.com/kennethreitz-archive/sphinx-to-github.git
synced 2026-06-05 23:40:17 +00:00
sphinxtogithub.py: Handle hard-coded '_sources/' in javascript files
Sphinx's searchtools.js has a hard-coded '_sources/' string. This adds a Replacer object to handle the '_sources/' string in javascript files. Signed-off-by: David Aguilar <davvid@gmail.com>
This commit is contained in:
committed by
Michael Jones
parent
5ebb0c3b7a
commit
3bd9cd8471
@@ -183,6 +183,12 @@ class LayoutFactory(object):
|
||||
filelist.append(
|
||||
FileHandler(os.path.join(root, f), replacers, open)
|
||||
)
|
||||
if f.endswith(".js"):
|
||||
filelist.append(
|
||||
FileHandler(os.path.join(root, f),
|
||||
[Replacer("'_sources/'", "'sources/'")],
|
||||
open)
|
||||
)
|
||||
|
||||
return Layout(underscore_directories, filelist)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user