From 4f7217b0b3913fdb7e9b2fc49da94bb587ad58ae Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 21 Apr 2020 15:28:00 -0400 Subject: [PATCH] validate: Add { and [ as line continuation markers Part-of: --- validate/gst/validate/gst-validate-utils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/validate/gst/validate/gst-validate-utils.c b/validate/gst/validate/gst-validate-utils.c index b5422d0530..9ec92f868f 100644 --- a/validate/gst/validate/gst-validate-utils.c +++ b/validate/gst/validate/gst-validate-utils.c @@ -558,6 +558,7 @@ skip_spaces (gchar * c) } /* Parse file that contains a list of GStructures */ +#define GST_STRUCT_LINE_CONTINUATION_CHARS ",{\\[" static GList * _file_get_structures (GFile * file, gchar ** err) { @@ -609,9 +610,9 @@ _file_get_structures (GFile * file, gchar ** err) while (*tmp != '\n' && *tmp) { gchar next = *(tmp + 1); - /* ',' and '\\' are line continuation indicators */ - if (next && next == '\n' && (*tmp == ',' || *tmp == '\\')) { - if (*tmp == ',') + if (next && next == '\n' + && strchr (GST_STRUCT_LINE_CONTINUATION_CHARS, *tmp)) { + if (*tmp != '\\') g_string_append_c (l, *tmp); tmp += 2;