Mercurial > public > mercurial-scm > hg
comparison doc/hgmanpage.py @ 42059:51df72655b1a
hgmanpage: use range instead of xrange
author | Philippe Pepiot <philippe.pepiot@logilab.fr> |
---|---|
date | Thu, 04 Apr 2019 19:08:05 +0200 |
parents | eb14ab7db33e |
children | 93a1a4fef532 |
comparison
equal
deleted
inserted
replaced
42058:ec7b478f1bf8 | 42059:51df72655b1a |
---|---|
261 """Return the final formatted document as a string.""" | 261 """Return the final formatted document as a string.""" |
262 if not self.header_written: | 262 if not self.header_written: |
263 # ensure we get a ".TH" as viewers require it. | 263 # ensure we get a ".TH" as viewers require it. |
264 self.head.append(self.header()) | 264 self.head.append(self.header()) |
265 # filter body | 265 # filter body |
266 for i in xrange(len(self.body) - 1, 0, -1): | 266 for i in range(len(self.body) - 1, 0, -1): |
267 # remove superfluous vertical gaps. | 267 # remove superfluous vertical gaps. |
268 if self.body[i] == '.sp\n': | 268 if self.body[i] == '.sp\n': |
269 if self.body[i - 1][:4] in ('.BI ','.IP '): | 269 if self.body[i - 1][:4] in ('.BI ','.IP '): |
270 self.body[i] = '.\n' | 270 self.body[i] = '.\n' |
271 elif (self.body[i - 1][:3] == '.B ' and | 271 elif (self.body[i - 1][:3] == '.B ' and |