From 0e46ecb0034ed378b926a113e1897f2740fc6d87 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 12 Dec 2019 16:25:43 +0100 Subject: [PATCH] mono-docs: Nicer formatting for notes This has never been tested because so far EO "Note:" tags are only recognized when they appear at the beginning of a comment block. It turns out the note already includes the "Note:" prefix so we were adding it twice. This patch removes one of the prefixes and used a nicer formatting. Also works for "Warning:", "Remark:" and "TODO:". --- src/bin/eolian_mono/eolian/mono/documentation.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh index 7d90e78801..23708298e0 100644 --- a/src/bin/eolian_mono/eolian/mono/documentation.hh +++ b/src/bin/eolian_mono/eolian/mono/documentation.hh @@ -273,16 +273,16 @@ struct documentation_generator new_text += token_text; break; case ::EOLIAN_DOC_TOKEN_MARK_NOTE: - new_text += "NOTE: " + token_text; + new_text += "NOTE:" + token_text.substr(5, token_text.length() - 5); break; case ::EOLIAN_DOC_TOKEN_MARK_WARNING: - new_text += "WARNING: " + token_text; + new_text += "WARNING:" + token_text.substr(8, token_text.length() - 8); break; case ::EOLIAN_DOC_TOKEN_MARK_REMARK: - new_text += "REMARK: " + token_text; + new_text += "REMARK:" + token_text.substr(7, token_text.length() - 7); break; case ::EOLIAN_DOC_TOKEN_MARK_TODO: - new_text += "TODO: " + token_text; + new_text += "TODO:" + token_text.substr(5, token_text.length() - 5); break; case ::EOLIAN_DOC_TOKEN_MARKUP_MONOSPACE: new_text += "" + token_text + "";