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.
This commit is contained in:
Xavi Artigas 2019-04-11 13:18:33 +02:00
parent b849ad9022
commit 479488335c
1 changed files with 2 additions and 1 deletions

View File

@ -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;