Add the notion of standalone doc sections.

Up to now, section annotations had to match a class or interface
name in order to be serialized in the gir.

With this commit, they now get serialized as docsection nodes,
for potential use by documentation tools.
This commit is contained in:
Mathieu Duponchelle 2020-06-06 02:13:38 +02:00
parent d41f718dda
commit 445c942f7d

View File

@ -2830,7 +2830,8 @@ start_element_handler (GMarkupParseContext *context,
ctx, error))
goto out;
if (strcmp ("doc", element_name) == 0 || strcmp ("doc-deprecated", element_name) == 0 ||
strcmp ("doc-stability", element_name) == 0 || strcmp ("doc-version", element_name) == 0)
strcmp ("doc-stability", element_name) == 0 || strcmp ("doc-version", element_name) == 0 ||
strcmp ("docsection", element_name) == 0)
{
state_switch (ctx, STATE_PASSTHROUGH);
goto out;