changeset 24591:517f3e190a5d

json: implement {help} template We should consider add HTML rendering of the RST into the response as a follow-up. I attempted to do this, but there was an empty array returned by the rstdoc() template function. Not sure what's going on. Will deal with it later.
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 01 Apr 2015 22:24:03 -0700
parents 0bb733dfcabe
children d7cf8102bf09
files mercurial/templates/json/map tests/test-hgweb-json.t
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templates/json/map	Wed Apr 01 22:16:05 2015 -0700
+++ b/mercurial/templates/json/map	Wed Apr 01 22:24:03 2015 -0700
@@ -92,6 +92,9 @@
   "topic": {topic|json},
   "summary": {summary|json}
   }'
-help = '"not yet implemented"'
+help = '\{
+  "topic": {topic|json},
+  "rawdoc": {doc|json}
+  }'
 filenodelink = ''
 filenolink = ''
--- a/tests/test-hgweb-json.t	Wed Apr 01 22:16:05 2015 -0700
+++ b/tests/test-hgweb-json.t	Wed Apr 01 22:24:03 2015 -0700
@@ -1003,4 +1003,7 @@
   $ request json-help/phases
   200 Script output follows
   
-  "not yet implemented"
+  {
+    "rawdoc": "Working with Phases\n*", (glob)
+    "topic": "phases"
+  }