gtkdoc-fixxref can only resolve links if they don't contain a linebreak
I ran up against a limitation in gtkdoc-fixxref. It wasn't resolving this kind of image link properly:
<link linkend="my-linkend">
<inlinemediaobject>
<imageobject><imagedata fileref="my-icon.svg" /></imageobject>
<alt>This is an image that links somewhere</alt>
</inlinemediaobject>
</link>
This turned out to be because of the newlines between the <link>
and </link>
tags.
The limitation is fixxref.py line 253:
for i in range(len(lines)):
lines[i] = re.sub(r'<GTKDOCLINK\s+HREF="([^"]*)"\s*>(.*?)</GTKDOCLINK\s*>', repl_func_with_ix(i), lines[i])
if 'GTKDOCLINK' in lines[i]:
logging.info('make xref failed for line %d: "%s"', i, lines[i])
It's not immediately clear how to improve this part of the code. Removing the newlines is a good workaround, but it would be nice if the tool supported resolving link tags spread across more than 1 line.
Edited by Sam Thursfield