| Index: utils/apidoc/app_engine/scripts/redirector.py
|
| diff --git a/utils/apidoc/app_engine/scripts/redirector.py b/utils/apidoc/app_engine/scripts/redirector.py
|
| index 6b8ff2b5802a0c8477a4084f88dea0faf90e1404..9687ff0babcd13966a5c47b0048a1684cbab37d2 100644
|
| --- a/utils/apidoc/app_engine/scripts/redirector.py
|
| +++ b/utils/apidoc/app_engine/scripts/redirector.py
|
| @@ -105,7 +105,7 @@ class ApiDocs(blobstore_handlers.BlobstoreDownloadHandler):
|
|
|
| def redir_to_latest(handler, *args, **kwargs):
|
| path = kwargs['path']
|
| - if re.search(r'^(core|coreimpl|crypto|io|isolate|json|uri|utf|web)', path):
|
| + if re.search(r'^(core|coreimpl|crypto|io|isolate|json|uri|html|math|utf|web)', path):
|
| return '/docs/continuous/dart_' + path
|
| else:
|
| return '/docs/continuous/' + path
|
| @@ -113,9 +113,15 @@ def redir_to_latest(handler, *args, **kwargs):
|
| def redir_dom(handler, *args, **kwargs):
|
| return '/docs/continuous/dart_html' + kwargs['path']
|
|
|
| +class CurrentVersionHandler(RequestHandler):
|
| + def get(self, version):
|
| + self.response.headers['Content-Type'] = 'text/plain'
|
| + self.response.out.write(ApiDocs.latest_doc_version)
|
| +
|
| application = WSGIApplication(
|
| [
|
| Route('/dom<path:.*>', RedirectHandler, defaults={'_uri': redir_dom}),
|
| + Route('/currentversion/<version:.*>', CurrentVersionHandler),
|
| ('/docs.*', ApiDocs),
|
| Route('/<path:.*>', RedirectHandler, defaults={'_uri': redir_to_latest})
|
| ],
|
|
|