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

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 6, 2016, 12:04 p.m.
Message ID <7b433529446141f31602.1454760258@mimosa>
Download mbox | patch
Permalink /patch/13026/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Yuya Nishihara - Feb. 6, 2016, 12:04 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.
Martin von Zweigbergk - Feb. 10, 2016, 9:08 p.m.
Seems good. I'm queuing this for stable, thanks.

Patch

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: