Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3679)

Unified Diff: chrome/common/extensions/docs/server2/content_provider.py

Issue 498813002: Rename the docserver third_party dependency "handlebar" to "motemplate", as part (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: imports Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/content_provider.py
diff --git a/chrome/common/extensions/docs/server2/content_provider.py b/chrome/common/extensions/docs/server2/content_provider.py
index 84e3d2c40a1ebf2d896d2576a3275fab61070f42..e04dc7f4489a23ed207bbfb6dbf4049399f3ce88 100644
--- a/chrome/common/extensions/docs/server2/content_provider.py
+++ b/chrome/common/extensions/docs/server2/content_provider.py
@@ -15,8 +15,8 @@ from future import All, Future
from path_canonicalizer import PathCanonicalizer
from path_util import AssertIsValid, IsDirectory, Join, ToDirectory
from special_paths import SITE_VERIFICATION_FILE
-from third_party.handlebar import Handlebar
from third_party.markdown import markdown
+from third_party.motemplate import Motemplate
_MIMETYPE_OVERRIDES = {
@@ -42,7 +42,7 @@ class ContentProvider(object):
Typically the file contents will be either str (for binary content) or
unicode (for text content). However, HTML files *may* be returned as
- Handlebar templates (if |supports_templates| is True on construction), in
+ Motemplate templates (if |supports_templates| is True on construction), in
which case the caller will presumably want to Render them.
Zip file are automatically created and returned for .zip file extensions if
@@ -89,7 +89,7 @@ class ContentProvider(object):
content = markdown(ToUnicode(text),
extensions=('extra', 'headerid', 'sane_lists'))
if self._supports_templates:
- content = Handlebar(content, name=path)
+ content = Motemplate(content, name=path)
mimetype = 'text/html'
elif mimetype is None:
content = text
@@ -97,7 +97,7 @@ class ContentProvider(object):
elif mimetype == 'text/html':
content = ToUnicode(text)
if self._supports_templates:
- content = Handlebar(content, name=path)
+ content = Motemplate(content, name=path)
elif (mimetype.startswith('text/') or
mimetype in ('application/javascript', 'application/json')):
content = ToUnicode(text)

Powered by Google App Engine
This is Rietveld 408576698