q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e8fc41613083f9cb8a3b34d4d1f5345b08a0289

commit 2e8fc41613083f9cb8a3b34d4d1f5345b08a0289
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Fri Jul 3 16:13:59 2015 +0100

    eolian: add support for monospace highlights in docs
---
 src/bin/eolian/docs_generator.c    | 10 +++++++++-
 src/tests/eolian/data/struct.eo    |  1 +
 src/tests/eolian/data/struct_ref.c |  4 ++--
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/bin/eolian/docs_generator.c b/src/bin/eolian/docs_generator.c
index 41b506d..5d872d3 100644
--- a/src/bin/eolian/docs_generator.c
+++ b/src/bin/eolian/docs_generator.c
@@ -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);
diff --git a/src/tests/eolian/data/struct.eo b/src/tests/eolian/data/struct.eo
index 6b33952..c59c516 100644
--- a/src/tests/eolian/data/struct.eo
+++ b/src/tests/eolian/data/struct.eo
@@ -17,6 +17,7 @@ struct @extern Not.Generated {
 class Struct {
    methods {
       foo {
+         [[Foo docs. This is $monospace.]]
          params {
             idx: int;
          }
diff --git a/src/tests/eolian/data/struct_ref.c 
b/src/tests/eolian/data/struct_ref.c
index 455d60a..85e8b5b 100644
--- a/src/tests/eolian/data/struct_ref.c
+++ b/src/tests/eolian/data/struct_ref.c
@@ -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);
 

-- 


Reply via email to