From 2c96a2059f15cd0428d3befe4ea7b03d51c5864e Mon Sep 17 00:00:00 2001 From: lz Date: Sun, 29 Sep 2024 15:25:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9E=20fix(README.md):=20fix=20synt?= =?UTF-8?q?ax=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 70847ef9..8c192ea8 100644 --- a/README.md +++ b/README.md @@ -23,15 +23,16 @@ toml11 is a feature-rich TOML language library for C++11/14/17/20. ## Example +```toml +# example.toml +title = "an example toml file" +nums = [3, 1, 4, 1, 5] # pi! +``` + ```cpp #include #include -// ```toml -// title = "an example toml file" -// nums = [3, 1, 4, 1, 5] # pi! -// ``` - int main() { // select TOML version at runtime (optional) @@ -50,7 +51,7 @@ int main() } if(data.at("nums").is_array()) { - data.push_back(9); + data["nums"].as_array().push_back(9); } // check comments From 576a71aa0ef2d93272510111b7e052ad9bf76f52 Mon Sep 17 00:00:00 2001 From: lz Date: Sun, 29 Sep 2024 15:27:07 +0800 Subject: [PATCH 2/3] update README.md --- README.md | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8c192ea8..f2113b7c 100644 --- a/README.md +++ b/README.md @@ -71,20 +71,37 @@ int main() } ``` -For more details, please refer to the [documentation](https://toruniina.github.io/toml11/). + +Fix syntax errors in examples +Fix syntax errors in examplesFor more details, please refer to the [documentation](https://toruniina.github.io/toml11/). ## Table of Contents -- [Integration](#integration) -- [Features](#features) - - [parsing a file](#parsing-a-file) - - [finding a value](#finding-a-value) - - [comments](#comments) - - [error messages](#error-messages) - - [serialization](#serialization) -- [Breaking Changes from v3](#changes-from-v3) -- [Contributors](#contributors) -- [Licensing Terms](#licensing-terms) +- [toml11](#toml11) + - [Example](#example) + - [Table of Contents](#table-of-contents) + - [Integration](#integration) + - [Single Include File](#single-include-file) + - [git submodule](#git-submodule) + - [CMake `FetchContent`](#cmake-fetchcontent) + - [CMake Package Manager (CPM)](#cmake-package-manager-cpm) + - [Install Using CMake](#install-using-cmake) + - [Precompile Library](#precompile-library) + - [Building Example](#building-example) + - [Building Tests](#building-tests) + - [Features](#features) + - [Parsing a File](#parsing-a-file) + - [finding a value](#finding-a-value) + - [comments](#comments) + - [error messages](#error-messages) + - [serialization](#serialization) + - [Configuring Types](#configuring-types) + - [Examples](#examples) + - [Changes from v3](#changes-from-v3) + - [Breaking Changes](#breaking-changes) + - [Added features](#added-features) + - [Contributors](#contributors) + - [Licensing terms](#licensing-terms) ## Integration From 5445905e5e7b707b86491c9a75a877613cb53797 Mon Sep 17 00:00:00 2001 From: somebody <126656175+oldoldtea@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:04:57 +0800 Subject: [PATCH 3/3] Update README.md Co-authored-by: Toru Niina --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index f2113b7c..7e18612b 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,7 @@ int main() ``` -Fix syntax errors in examples -Fix syntax errors in examplesFor more details, please refer to the [documentation](https://toruniina.github.io/toml11/). +For more details, please refer to the [documentation](https://toruniina.github.io/toml11/). ## Table of Contents