mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
giscanner: fix description field storage in .gir files
GTK-Doc description fields for tags can contain multiple lines and even multiple paragraphs. Whitespace cannot be preserved in XML attributes, so we move the "deprecated" description text into a "<doc-deprecated />" element right next to where we already have the "<doc />" element. Keep the "deprecated" attribute around for backwards compatibility though, but set its value to "1" (analogous to the "writable", "contruct", etc attributes) if the annotated symbol is marked as deprecated. While at it, add <doc-version /> and <doc-stability /> which was not yet available in the .gir files... This takes care of the "Since:", "Stability:" and "Deprecated:" GTK-Doc tags. Nothing needs to be done for the "Returns:" tag as as we already write a "<doc />" child element on "<return-value />".
This commit is contained in:
parent
c9b088c24f
commit
c87579bbb6
@ -2748,7 +2748,8 @@ start_element_handler (GMarkupParseContext *context,
|
||||
attribute_names, attribute_values,
|
||||
ctx, error))
|
||||
goto out;
|
||||
if (strcmp (element_name, "doc") == 0)
|
||||
if (strcmp ("doc", element_name) == 0 || strcmp ("doc-deprecated", element_name) == 0 ||
|
||||
strcmp ("doc-stability", element_name) == 0 || strcmp ("doc-version", element_name) == 0)
|
||||
{
|
||||
state_switch (ctx, STATE_PASSTHROUGH);
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user