diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c index 1f612f1c8f..02df2fa9d4 100644 --- a/src/lib/eolian/eo_lexer.c +++ b/src/lib/eolian/eo_lexer.c @@ -275,9 +275,15 @@ read_doc(Eo_Lexer *ls, Eo_Token *tok, int line, int column) } if (is_newline(ls->current)) { - while (is_newline(ls->current)) - next_line_ws(ls); - break; + next_line_ws(ls); + if (is_newline(ls->current)) + { + while (is_newline(ls->current)) + next_line_ws(ls); + break; + } + else + eina_strbuf_append_char(ls->buff, ' '); } else { diff --git a/src/tests/eolian/data/docs.eo b/src/tests/eolian/data/docs.eo index c219cedbe5..eb89c929f6 100644 --- a/src/tests/eolian/data/docs.eo +++ b/src/tests/eolian/data/docs.eo @@ -1,5 +1,6 @@ struct Foo { [[This is struct Foo. + It does stuff. This is a longer description for struct Foo. diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 8b8503b086..8ffc93626e 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -1150,7 +1150,7 @@ START_TEST(eolian_docs) fail_if(!(type = eolian_type_struct_get_by_name("Foo"))); fail_if(!(doc = eolian_type_documentation_get(type))); fail_if(strcmp(eolian_documentation_summary_get(doc), - "This is struct Foo.")); + "This is struct Foo. It does stuff.")); fail_if(strcmp(eolian_documentation_description_get(doc), "This is a longer description for struct Foo.\n\n" "This is another paragraph."));