Re: CDATA in source comments



On Mon, 2004-11-22 at 19:23 +0100, Stefan Kost wrote:
> hi hi,
> 
> I've tried to put some sample code into a doc comment
> 
> /**
>   * ...
>   * <informalexample><programlisting><![CDATA[
>   * g_object_get(bla,"peng",&peng);]]></programlisting>
>   * </informalexample>
>   */
> 
> This generates errors in the XML (xml/filename.xml). Some code in the gtk-doc
> toolchain converts the '>' after the ']]' that closes the CDATA section into &gt;.

Yes, unless you call gtkdoc-mkdb with the switch to disable markup in
comments (whose name escapes me at the moment)

It shouldn't be necessary to use a marked section there, because, as you
noticed, gtk-doc handles the & < > escaping for you. What you may want
to do is prevent gtk-doc from generating links for argumentless function
calls, by writing them as foo(<!-- -->). That is a bit ugly, but works.

Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]