From e041465496da0026501177725d6435d823244fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 10 Jun 2022 23:42:41 +0200 Subject: Handle newlines at beginning of file. --- xroff.lex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xroff.lex b/xroff.lex index 72ab379..9326415 100644 --- a/xroff.lex +++ b/xroff.lex @@ -8,9 +8,10 @@ %% \\ BEGIN(ESC); +^\n* /* Ignore newlines at beginning of file. */ \n BEGIN(NEW); \ /* Ignore comment. */ +\\n* /* Ignore comment. */ ^< printf("."); BEGIN(REQ); /* Beginning of file. */ \< printf("\\c\n."); BEGIN(REQ); . ECHO; -- cgit v1.2.3