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

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

Issue 220023002: Cleanup ReferenceResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add documentation in document_renderer.py Created 6 years, 8 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
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/reference_resolver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/document_renderer.py
diff --git a/chrome/common/extensions/docs/server2/document_renderer.py b/chrome/common/extensions/docs/server2/document_renderer.py
index e254908814c64709c315f2b18a1e673f6941c99a..7c2cd37616acc1fd8715f86a76c46005a365c3c1 100644
--- a/chrome/common/extensions/docs/server2/document_renderer.py
+++ b/chrome/common/extensions/docs/server2/document_renderer.py
@@ -26,7 +26,15 @@ class DocumentRenderer(object):
self._ref_resolver = ref_resolver
def _RenderLinks(self, document, path):
- ''' Replaces all $(ref:...) references in |document| with html links
+ ''' Replaces all $(ref:...) references in |document| with html links.
+
+ References have two forms:
+
+ $(ref:api.node) - Replaces the reference with a link to node on the
+ API page. The title is set to the name of the node.
+
+ $(ref:api.node Title) - Same as the previous form, but title is set
+ to "Title".
'''
START_REF = '$(ref:'
END_REF = ')'
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/reference_resolver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698