[LTP] [PATCH v2 1/1] docparse: Escape backslash, tab and double quote in JSON

Cyril Hrubis chrubis@suse.cz
Tue May 4 13:42:50 CEST 2021


Hi!
> Avoid quoting new line as it's usually expected formatting,
> e.g. in .options field.

Hmm, looking at the cases that have \n in option strings it looks like a
messy hack rather than anything else...

I guess that a proper fix would be an ability to group the options, i.e.
make the .options an array of arrays so that the structures would look like:


	.options = (struct tst_option_group[]) {
		{.title = "Server", .options = (struct tst_option) {
			{"l", &foo, "Foo option help"},
			{}
		},
		...
		{}
	}


But that is something that is completely out of scope for this patch...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list