Skip to content

Commit dd887ea

Browse files
committed
Expand tabs in line during text wrapping, for consistent indentation handling.
- Legacy-Id: 3096
1 parent 906484a commit dd887ea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/idtracker/templatetags/ietf_filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ def wrap_text(text, width=72):
281281
filled = []
282282
wrapped = False
283283
for line in lines:
284-
expanded = line.expandtabs()
285-
indent = " " * (len(expanded) - len(expanded.lstrip()))
284+
line = line.expandtabs()
285+
indent = " " * (len(line) - len(line.lstrip()))
286286
if wrapped and line.strip() != "" and indent == prev_indent:
287287
line = filled[-1] + " " + line.lstrip()
288288
filled = filled[:-1]

0 commit comments

Comments
 (0)