zmike pushed a commit to branch efl-1.22.

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

commit be112b125cb294221ebdd9efafea16c2b4ce1501
Author: Xavi Artigas <[email protected]>
Date:   Thu Apr 11 13:18:33 2019 +0200

    mono-docs: Properly indent code examples
    
    First code line was indented differently by DocFX because of tabs,
    whitespace or who knows what. This adds a newline after the <code>
    tag so all code lines have the same indentation.
---
 src/bin/eolian_mono/eolian/mono/documentation.hh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh 
b/src/bin/eolian_mono/eolian/mono/documentation.hh
index 0460b5783e..d603e0bb99 100644
--- a/src/bin/eolian_mono/eolian/mono/documentation.hh
+++ b/src/bin/eolian_mono/eolian/mono/documentation.hh
@@ -323,7 +323,8 @@ struct documentation_generator
       // There is no example file for this class or method, just return
       if (!exfile.good()) return true;
       std::stringstream example_buff;
-      example_buff << exfile.rdbuf();
+      // Start with a newline so the first line renders with same indentation 
as the rest
+      example_buff << std::endl << exfile.rdbuf();
 
       if (!as_generator(scope_tab(scope_size) << "/// ").generate(sink, 
attributes::unused, context)) return false;
       if (!generate_opening_tag(sink, "example", context)) return false;

-- 


Reply via email to