eolian: add support for monospace highlights in docs

This commit is contained in:
Daniel Kolesa 2015-07-03 16:13:59 +01:00
parent e9a0904768
commit 2e8fc41613
3 changed files with 12 additions and 3 deletions

View File

@ -34,7 +34,7 @@ _append_section(const char *desc, int ind, int curl, Eina_Strbuf *buf,
if (*desc == '\\')
{
desc++;
if (*desc != '@')
if ((*desc != '@') && (*desc != '$'))
eina_strbuf_append_char(wbuf, '\\');
eina_strbuf_append_char(wbuf, *desc++);
}
@ -46,6 +46,14 @@ _append_section(const char *desc, int ind, int curl, Eina_Strbuf *buf,
else
eina_strbuf_append_char(wbuf, '@');
}
else if (*desc == '$')
{
desc++;
if (isalpha(*desc))
eina_strbuf_append(wbuf, "@c ");
else
eina_strbuf_append_char(wbuf, '@');
}
while (*desc && !isspace(*desc))
eina_strbuf_append_char(wbuf, *desc++);
int limit = DOC_LIMIT(ind);

View File

@ -17,6 +17,7 @@ struct @extern Not.Generated {
class Struct {
methods {
foo {
[[Foo docs. This is $monospace.]]
params {
idx: int;
}

View File

@ -31,9 +31,9 @@ typedef struct _Opaque Opaque;
EAPI const Eo_Class *struct_class_get(void) EINA_CONST;
/**
* No description supplied.
* @brief Foo docs. This is @c monospace.
*
* @param[in] idx No description supplied.
* @param[in] idx
*/
EOAPI char * struct_foo(int idx);