[PATCH 2 of 3 V3 [NOW_WITH_DOCS!]] hgweb: apply the websub filter to revision descriptions

Martin Geisler martin at geisler.net
Sat Feb 9 16:58:40 CST 2013


Angel Ezquerra <angel.ezquerra at gmail.com> writes:

> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1360424901 -3600
> # Node ID 3d1290c7131e8e1df991f1753ab5e76d3e3cd21e
> # Parent  04299b2afc200171eeca472c5d5644e84048a3b5
> hgweb: apply the websub filter to revision descriptions
>
> In order to use this, add a [websub] section to your configuration and add
> websub expressions such as:
>
> italic = s/\b_(\S+)_\b/<i>\1<\/i>/
> bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
> issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
> bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!<a href="http://bz.selenic.com/\2">\1</a>!i
>
> This also adds documentation (proofed by Kevin!) to the config help section.
>
> diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
> --- a/mercurial/help/config.txt
> +++ b/mercurial/help/config.txt
> @@ -1463,3 +1463,36 @@
>  
>  ``templates``
>      Where to find the HTML templates. Default is install path.
> +
> +``websub``
> +-------

The underline should be three '-'s longer to match the text.

-- 
Martin Geisler


More information about the Mercurial-devel mailing list