# HG changeset patch # User Gregory Szorc # Date 1427952243 25200 # Node ID 517f3e190a5d32539827e6171ce450bad8d3557b # Parent 0bb733dfcabe2dd65bd24d63ebce21435e2cc5dd 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. diff --git a/mercurial/templates/json/map b/mercurial/templates/json/map --- a/mercurial/templates/json/map +++ b/mercurial/templates/json/map @@ -92,6 +92,9 @@ "topic": {topic|json}, "summary": {summary|json} }' -help = '"not yet implemented"' +help = '\{ + "topic": {topic|json}, + "rawdoc": {doc|json} + }' filenodelink = '' filenolink = '' diff --git a/tests/test-hgweb-json.t b/tests/test-hgweb-json.t --- a/tests/test-hgweb-json.t +++ b/tests/test-hgweb-json.t @@ -1003,4 +1003,7 @@ $ request json-help/phases 200 Script output follows - "not yet implemented" + { + "rawdoc": "Working with Phases\n*", (glob) + "topic": "phases" + }