mercurial/templatefilters.py
changeset 40029 e2697acd9381
parent 38783 e7aa113b14f7
child 41997 4df7c4b70e03
equal deleted inserted replaced
40028:51f10e6d66c7 40029:e2697acd9381
   198         while True:
   198         while True:
   199             m = para_re.search(text, start)
   199             m = para_re.search(text, start)
   200             if not m:
   200             if not m:
   201                 uctext = encoding.unifromlocal(text[start:])
   201                 uctext = encoding.unifromlocal(text[start:])
   202                 w = len(uctext)
   202                 w = len(uctext)
   203                 while 0 < w and uctext[w - 1].isspace():
   203                 while w > 0 and uctext[w - 1].isspace():
   204                     w -= 1
   204                     w -= 1
   205                 yield (encoding.unitolocal(uctext[:w]),
   205                 yield (encoding.unitolocal(uctext[:w]),
   206                        encoding.unitolocal(uctext[w:]))
   206                        encoding.unitolocal(uctext[w:]))
   207                 break
   207                 break
   208             yield text[start:m.start(0)], m.group(1)
   208             yield text[start:m.start(0)], m.group(1)