##// 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 from i18n import gettext, _
9 import itertools, os, textwrap
9 import itertools, os, textwrap
10 import error
10 import error
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
12 import templater
12 import encoding, util, minirst
13 import encoding, util, minirst
13 import cmdutil
14 import cmdutil
14 import hgweb.webcommands as webcommands
15 import hgweb.webcommands as webcommands
@@ -209,6 +210,7 addtopicsymbols('merge-tools', '.. inter
209 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
210 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
210 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
211 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
211 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
212 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
213 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
212 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
214 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
213 dedent=True)
215 dedent=True)
214
216
@@ -41,39 +41,7 Note that a filter is nothing more than
41
41
42 In addition to filters, there are some basic built-in functions:
42 In addition to filters, there are some basic built-in functions:
43
43
44 - date(date[, fmt])
44 .. functionsmarker
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])
77
45
78 Also, for any expression that returns a list, there is a list operator:
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