[PATCH STABLE] help: update template examples to use reST literal syntax

Yuya Nishihara yuya at tcha.org
Sat Feb 6 12:04:18 UTC 2016


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1454681827 -32400
#      Fri Feb 05 23:17:07 2016 +0900
# Branch stable
# Node ID 7b433529446141f3160223b07da781373b740e32
# Parent  61f4d59e9a0be4e25c1aa016db1a80a540a9d337
help: update template examples to use reST literal syntax

This should prevent processing backslashes as reST syntax elements. Before
this patch, '\' was lost in HTML and man pages.

diff --git a/mercurial/help/templates.txt b/mercurial/help/templates.txt
--- a/mercurial/help/templates.txt
+++ b/mercurial/help/templates.txt
@@ -43,13 +43,13 @@ In addition to filters, there are some b
 
 .. functionsmarker
 
-Also, for any expression that returns a list, there is a list operator:
+Also, for any expression that returns a list, there is a list operator::
 
-- expr % "{template}"
+    expr % "{template}"
 
-As seen in the above example, "{template}" is interpreted as a template.
-To prevent it from being interpreted, you can use an escape character "\{"
-or a raw string prefix, "r'...'".
+As seen in the above example, ``{template}`` is interpreted as a template.
+To prevent it from being interpreted, you can use an escape character ``\{``
+or a raw string prefix, ``r'...'``.
 
 Some sample command line templates:
 


More information about the Mercurial-devel mailing list