comparison mercurial/templatefilters.py @ 14318:1f46be4689ed

help: consolidate topic hooks in help.py This removes loops like cmdutil->revset->help->extensions->cmdutil and simplifies the code.
author Matt Mackall <mpm@selenic.com>
date Fri, 13 May 2011 12:57:27 -0500
parents 7a6a8a069aac
children e2c413bde8a5
comparison
equal deleted inserted replaced
14317:660b0c1b6196 14318:1f46be4689ed
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 import cgi, re, os, time, urllib 8 import cgi, re, os, time, urllib
9 import encoding, node, util, help 9 import encoding, node, util
10 10
11 def addbreaks(text): 11 def addbreaks(text):
12 """:addbreaks: Any text. Add an XHTML "<br />" tag before the end of 12 """:addbreaks: Any text. Add an XHTML "<br />" tag before the end of
13 every line except the last. 13 every line except the last.
14 """ 14 """
356 "urlescape": urlescape, 356 "urlescape": urlescape,
357 "user": userfilter, 357 "user": userfilter,
358 "xmlescape": xmlescape, 358 "xmlescape": xmlescape,
359 } 359 }
360 360
361 def makedoc(topic, doc):
362 return help.makeitemsdoc(topic, doc, '.. filtersmarker', filters)
363
364 # tell hggettext to extract docstrings from these functions: 361 # tell hggettext to extract docstrings from these functions:
365 i18nfunctions = filters.values() 362 i18nfunctions = filters.values()