diff --git a/pygments/lexers/algebra.py b/pygments/lexers/algebra.py index 706a7fb367..058906d693 100644 --- a/pygments/lexers/algebra.py +++ b/pygments/lexers/algebra.py @@ -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:] diff --git a/pygments/lexers/julia.py b/pygments/lexers/julia.py index 97d9163af0..5ac943579a 100644 --- a/pygments/lexers/julia.py +++ b/pygments/lexers/julia.py @@ -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:] diff --git a/pygments/lexers/make.py b/pygments/lexers/make.py index d9027f3c28..e573d519ce 100644 --- a/pygments/lexers/make.py +++ b/pygments/lexers/make.py @@ -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