From 5672aa635ebb22452b9de06ccfbead81a6c54c54 Mon Sep 17 00:00:00 2001 From: ado Date: Thu, 20 Jul 2023 00:19:31 +0200 Subject: [PATCH 1/2] Update README links to sections --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ed9b9fc..d62f9d0 100644 --- a/README.md +++ b/README.md @@ -53,20 +53,20 @@ Brian S. Wolfe 40 1.9 Bill (Heath) Gates 65 3.3 ``` # Features - * [Works on any type](#Custom-conversions) + * [Works on any type](#custom-conversions) * Easy to use * No exceptions - * [Works with headers](#Headers) - * [Works with quotes, escapes and spacings](#Setup) - * [Works with values containing new lines](#Multiline) - * [Columns and rows can be ignored](#Special-types) + * [Works with headers](#headers) + * [Works with quotes, escapes and spacings](#setup) + * [Works with values containing new lines](#multiline) + * [Columns and rows can be ignored](#special-types) * Works with any type of delimiter * Can return whole objects composed of converted values - * [Descriptive error handling can be enabled](#Error-handling) - * [Restrictions can be added for each column](#Restrictions) - * [Works with `std::optional` and `std::variant`](#Special-types) + * [Descriptive error handling can be enabled](#error-handling) + * [Restrictions can be added for each column](#restrictions) + * [Works with `std::optional` and `std::variant`](#special-types) * Works with **`CRLF`** and **`LF`** - * [Conversions can be chained if invalid](#Substitute-conversions) + * [Conversions can be chained if invalid](#substitute-conversions) * Fast # Single header From 6edce88d79bc56723831ead6b49281adcc32e4c1 Mon Sep 17 00:00:00 2001 From: ado Date: Tue, 25 Jul 2023 00:36:53 +0200 Subject: [PATCH 2/2] Fix bug where the default delimiter would be used for multiline data --- include/ss/converter.hpp | 2 +- include/ss/parser.hpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/ss/converter.hpp b/include/ss/converter.hpp index 3650576..0cb4f80 100644 --- a/include/ss/converter.hpp +++ b/include/ss/converter.hpp @@ -194,7 +194,7 @@ private: //////////////// const split_data& resplit(line_ptr_type new_line, ssize_t new_size, - const std::string& delim = default_delimiter) { + const std::string& delim) { return splitter_.resplit(new_line, new_size, delim); } diff --git a/include/ss/parser.hpp b/include/ss/parser.hpp index d22cf45..4ad4df4 100644 --- a/include/ss/parser.hpp +++ b/include/ss/parser.hpp @@ -152,7 +152,7 @@ public: struct iterable { struct iterator { using value = std::conditional_t>; + no_void_validator_tup_t>; iterator() : parser_{nullptr} { } @@ -623,7 +623,8 @@ private: } } - next_line_converter_.resplit(next_line_buffer_, size); + next_line_converter_.resplit(next_line_buffer_, size, + delim_); } }