[gtksourceview] pcre2: set default newline to LF



commit 77dcf57fbee1a586d2b1d1758c8a84f71b3d289f
Author: Christian Hergert <chergert redhat com>
Date:   Thu Oct 1 14:16:34 2020 -0700

    pcre2: set default newline to LF

 gtksourceview/implregex.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtksourceview/implregex.c b/gtksourceview/implregex.c
index bfc77366..0a9a29a9 100644
--- a/gtksourceview/implregex.c
+++ b/gtksourceview/implregex.c
@@ -152,6 +152,8 @@ impl_regex_new (const char          *pattern,
                pcre2_set_newline (context, PCRE2_NEWLINE_CRLF);
        else if (compile_options & G_REGEX_NEWLINE_ANYCRLF)
                pcre2_set_newline (context, PCRE2_NEWLINE_ANYCRLF);
+       else
+               pcre2_set_newline (context, PCRE2_NEWLINE_LF);
 
        regex->code = pcre2_compile ((PCRE2_SPTR)pattern,
                                     PCRE2_ZERO_TERMINATED,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]