Patchwork [2,of,8] py3: make regexp literal bytes in templatefilters.py

login
register
mail settings
Submitter Yuya Nishihara
Date March 1, 2018, 2:17 p.m.
Message ID <4c40aaa3fe1cdee62898.1519913829@mimosa>
Download mbox | patch
Permalink /patch/28549/
State Accepted
Headers show

Comments

Yuya Nishihara - March 1, 2018, 2:17 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1519904409 18000
#      Thu Mar 01 06:40:09 2018 -0500
# Node ID 4c40aaa3fe1cdee62898dcd43840a070b76eb79b
# Parent  905fd8fbfd54838f8e079719e5ada074d975b824
py3: make regexp literal bytes in templatefilters.py

# skip-blame because just b'' prefixes

Patch

diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -145,7 +145,7 @@  def fill(text, width, initindent='', han
     global para_re, space_re
     if para_re is None:
         para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M)
-        space_re = re.compile(r'  +')
+        space_re = re.compile(br'  +')
 
     def findparas():
         start = 0