##// END OF EJS Templates
help: populate template functions via docstrings...
Gregory Szorc -
r24587:76c0b4cf default
parent child Browse files
Show More
@@ -9,6 +9,7 b' from i18n import gettext, _'
9 9 import itertools, os, textwrap
10 10 import error
11 11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
12 import templater
12 13 import encoding, util, minirst
13 14 import cmdutil
14 15 import hgweb.webcommands as webcommands
@@ -209,6 +210,7 b" addtopicsymbols('merge-tools', '.. inter"
209 210 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
210 211 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
211 212 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
213 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
212 214 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
213 215 dedent=True)
214 216
@@ -41,39 +41,7 b' Note that a filter is nothing more than '
41 41
42 42 In addition to filters, there are some basic built-in functions:
43 43
44 - date(date[, fmt])
45
46 - diff([includepattern [, excludepattern]])
47
48 - fill(text[, width])
49
50 - get(dict, key)
51
52 - if(expr, then[, else])
53
54 - ifcontains(expr, expr, then[, else])
55
56 - ifeq(expr, expr, then[, else])
57
58 - join(list, sep)
59
60 - label(label, expr)
61
62 - pad(text, width[, fillchar, right])
63
64 - revset(query[, formatargs])
65
66 - rstdoc(text, style)
67
68 - shortest(node)
69
70 - startswith(string, text)
71
72 - strip(text[, chars])
73
74 - sub(pat, repl, expr)
75
76 - word(number, text[, separator])
44 .. functionsmarker
77 45
78 46 Also, for any expression that returns a list, there is a list operator:
79 47
General Comments 0
You need to be logged in to leave comments. Login now