Skip to content

Commit

Permalink
Use explicit name for 'keepends' argument to splitlines
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Aug 18, 2022
1 parent 20de70c commit 06ed3a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pygments/lexers/algebra.py
Expand Up @@ -106,7 +106,7 @@ def get_tokens_unprocessed(self, text):
output = False
error = False

for line in text.splitlines(True):
for line in text.splitlines(keepends=True):
if line.startswith('gap> ') or line.startswith('brk> '):
insertions.append((len(curcode), [(0, Generic.Prompt, line[:5])]))
curcode += line[5:]
Expand Down
2 changes: 1 addition & 1 deletion pygments/lexers/julia.py
Expand Up @@ -252,7 +252,7 @@ def get_tokens_unprocessed(self, text):
output = False
error = False

for line in text.splitlines(True):
for line in text.splitlines(keepends=True):
if line.startswith('julia>'):
insertions.append((len(curcode), [(0, Generic.Prompt, line[:6])]))
curcode += line[6:]
Expand Down
2 changes: 1 addition & 1 deletion pygments/lexers/make.py
Expand Up @@ -44,7 +44,7 @@ class MakefileLexer(Lexer):

def get_tokens_unprocessed(self, text):
ins = []
lines = text.splitlines(True)
lines = text.splitlines(keepends=True)
done = ''
lex = BaseMakefileLexer(**self.options)
backslashflag = False
Expand Down

0 comments on commit 06ed3a8

Please sign in to comment.