From 26b1d538fc040ca934b9f189dd33667518dc08b5 Mon Sep 17 00:00:00 2001 From: grubert Date: Sat, 9 Mar 2013 10:19:35 +0000 Subject: [PATCH] safe check for startswith "." git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7628 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/writers/manpage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docutils/writers/manpage.py b/docutils/writers/manpage.py index 7af7cbc5f..3ea996116 100644 --- a/docutils/writers/manpage.py +++ b/docutils/writers/manpage.py @@ -290,7 +290,7 @@ class Translator(nodes.NodeVisitor): # unicode text = self.deunicode(text) # prevent interpretation of "." at line start - if text[0] == '.': + if text.startswith('.'): text = '\\&' + text if self._in_literal: text = text.replace('\n.', '\n\\&.') -- 2.11.4.GIT