From 3052868ab4df5c29362b3215161cb474b1e70beb Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Tue, 30 Jun 2020 19:27:06 +0200
Subject: [PATCH] [preprocessing] make logic preprocessor aware of dos-like
 line endings.

---
 src/kernel_internals/parsing/logic_preprocess.mll | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/kernel_internals/parsing/logic_preprocess.mll b/src/kernel_internals/parsing/logic_preprocess.mll
index ff9d1acb52d..34ea01b4d6b 100644
--- a/src/kernel_internals/parsing/logic_preprocess.mll
+++ b/src/kernel_internals/parsing/logic_preprocess.mll
@@ -94,13 +94,14 @@
     let content = Buffer.create 80 in
     let rec ignore_content () =
       let s = input_line file in
-      if s <> annot_beg then ignore_content ()
+      if not (Extlib.string_prefix annot_beg s) then ignore_content ()
     in
     let rec get_annot first =
       let s = input_line file in
-      if s = annot_end then false, Buffer.contents content
-      else if s = annot_end_nl then true, Buffer.contents content
-      else if s = annot_end_comment then begin
+      if Extlib.string_prefix annot_end s then false, Buffer.contents content
+      else if Extlib.string_prefix annot_end_nl s then
+        true, Buffer.contents content
+      else if Extlib.string_prefix annot_end_comment s then begin
         Buffer.add_char content '\n';
         false, Buffer.contents content
       end else begin
-- 
GitLab