fix main page code formatting

This commit is contained in:
Mark Gillard 2023-10-13 22:12:18 +03:00
parent 30172438ce
commit f1a38d23b7
2 changed files with 107 additions and 111 deletions

View File

@ -10,7 +10,7 @@ trim_trailing_whitespace = true
charset = utf-8
max_line_length = 120
[*.{gitattributes,yaml,yml,vcxproj,vcxproj.filters,sln,rc,clang-format,toml,py,cmake}]
[*.{gitattributes,yaml,yml,vcxproj,vcxproj.filters,sln,rc,clang-format,toml,py,cmake,md,markdown}]
indent_style = space
[{Doxyfile,Doxyfile-mcss,CMakeLists.txt}]

View File

@ -53,7 +53,6 @@ return 1;
}
return 0;
}
@endcpp
@ -89,7 +88,6 @@ cpp = 17
try
{
// parse directly from a string view:
{
toml::table tbl = toml::parse(some_toml);
@ -149,6 +147,7 @@ the parsing functions return a toml::parse_result instead of a toml::table:
int main()
{
toml::parse_result result = toml::parse_file("configuration.toml");
if (!result)
{
std::cerr << "Parsing failed:\n" << result.error() << "\n";
@ -157,7 +156,6 @@ return 1;
do_stuff_with_your_config(std::move(result).table()); // 'steal' the table from the result
return 0;
}
@endcpp
@ -225,7 +223,6 @@ minerals = [ "quartz", "iron", "copper", "diamond" ]
cats = [ "tiger", "lion", "puma" ]
birds = [ "macaw", "pigeon", "canary" ]
fish = [ "salmon", "trout", "carp" ]
)"sv;
toml::table tbl = toml::parse(source);
@ -390,7 +387,6 @@ github: 'https://github.com/marzer'
name: 'Mark Gillard'
twitter: 'https://twitter.com/marzer8789'
cpp:
- 17
- 20
- 'and beyond'