mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
validate: Add { and [ as line continuation markers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/177>
This commit is contained in:
parent
856944c960
commit
4f7217b0b3
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue