summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-12-10 16:16:46 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-12-10 16:16:46 +0100
commit7ad8efdfac0fe2fc2252695ac10635ce3c0ac800 (patch)
tree15f4631894b8a30be0ac243f1242e6f16717b1b4
parenta8d7816782a1f48c12f2387a85168175f5baf7e2 (diff)
downloadefl-devs/xartigas/eolian_mono_list_formatting.tar.gz
WIP: Special formatting of lists using regexpsdevs/xartigas/eolian_mono_list_formatting
-rw-r--r--src/bin/eolian_mono/eolian/mono/documentation.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh
index 0a2179b167..312c136aa7 100644
--- a/src/bin/eolian_mono/eolian/mono/documentation.hh
+++ b/src/bin/eolian_mono/eolian/mono/documentation.hh
@@ -23,6 +23,7 @@
#include "name_helpers.hh"
#include "generation_contexts.hh"
#include "blacklist.hh"
+#include <regex>
#include <Eina.h>
@@ -250,6 +251,7 @@ struct documentation_generator
name_tail = token_text.substr(token_text.length() - 4, 4);
}
::Eolian_Doc_Token_Type token_type = ::eolian_doc_token_type_get(&token);
+ std::regex rgx("(^|\n)( *)- ([a-zA-Z_]*):");
switch(token_type)
{
case ::EOLIAN_DOC_TOKEN_TEXT:
@@ -259,6 +261,8 @@ struct documentation_generator
if ((previous_token_type == ::EOLIAN_DOC_TOKEN_REF) &&
(token_text.substr(0, 2) == "()"))
token_text = token_text.substr(2, token_text.length() - 2);
+ // Special formatting for lists starting with a monospaced word: Replace by Bold.
+ token_text = std::regex_replace(token_text, rgx, "$2- <b>$3</b>:");
new_text += token_text;
break;
case ::EOLIAN_DOC_TOKEN_REF: