From 35f99a2883ee7f5e4ceedda1a6c4158f0f5e5c4a Mon Sep 17 00:00:00 2001 From: Sebastian Gutsche Date: Mon, 15 Apr 2019 14:28:51 +0200 Subject: [PATCH] Do not end pragma scanning at \t (horizontal tab) character but continue to scan until a "line break" character is encountered --- src/scanner.c | 2 +- tst/testinstall/pragma.tst | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/scanner.c b/src/scanner.c index 1646edaaa0..8e2d17def5 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -754,7 +754,7 @@ static void GetPragma(void) UInt i = 0; Char c = PEEK_CURR_CHAR(); - while ( c != '\n' && c != '\r' && c != '\f' && c != '\t' && c != '\377') { + while ( c != '\n' && c != '\r' && c != '\377') { i = AddCharToBuf(&string, buf, sizeof(buf), i, c); // read the next character diff --git a/tst/testinstall/pragma.tst b/tst/testinstall/pragma.tst index 2ff9bfa12c..50c3403565 100644 --- a/tst/testinstall/pragma.tst +++ b/tst/testinstall/pragma.tst @@ -10,3 +10,12 @@ function ( x ) #% pragma return x; end +gap> x := function( x ) +> #% pragma with tab +> return x; +> end;; +gap> Display( x ); +function ( x ) + #% pragma with tab + return x; +end \ No newline at end of file