# HG changeset patch # User Yuya Nishihara # Date 2016-01-16 10:23:53 # Node ID a25513263075d9698d821fbf9f156f4aa7fc709b # Parent 3ea3c96ada541aa3b673b0da14aaecf1d200428b templatefilters: document the json filter I don't know the exact reason why it was undocumented, but that would be because unicode is difficult for humans. Since the json filter can now get localstr back to UTF-8 as long as it is unprocessed (i.e. {desc|json} works, but {desc|firstline|json} doesn't), it seems good enough to advertise the json filter. diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py --- a/mercurial/templatefilters.py +++ b/mercurial/templatefilters.py @@ -238,6 +238,7 @@ def indent(text, prefix): @templatefilter('json') def json(obj, paranoid=True): + """Any object. Serializes the object to a JSON formatted text.""" if obj is None: return 'null' elif obj is False: