Skip to content

Multiline string config - #935

Merged
phlptp merged 1 commit into
CLIUtils:mainfrom
phlptp:multiline_string_config
Oct 27, 2023
Merged

phlptp merged 1 commit into
CLIUtils:mainfrom
phlptp:multiline_string_config

Conversation

@phlptp

@phlptp phlptp commented Oct 14, 2023

Copy link
Copy Markdown
Collaborator

Support for TOML style multiline string values and comments

@codecov

codecov Bot commented Oct 14, 2023 •

Copy link
Copy Markdown

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
include/CLI/impl/Config_inl.hpp 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

@phlptp

phlptp commented Oct 15, 2023

Copy link
Copy Markdown
Collaborator Author

This is necessary to fix the issue exposed by #930

@phlptp

phlptp commented Oct 15, 2023

Copy link
Copy Markdown
Collaborator Author

The basic issue is that it is possible to get multiline strings as a value into CLI11, and if those values are made into a config string they generate config files that can't be read, and cause some very strange crossover effects and errors, so the solution is that CLI11 needs to be able to have some way to generate and support strings containing newlines. The obvious solution is to support TOML multiline strings in the config files. Which is what this PR does.

@phlptp
phlptp requested a review from henryiii October 15, 2023 03:00
…ing test cases

update documentation

style: pre-commit.ci fixes
@phlptp
phlptp force-pushed the multiline_string_config branch from a0356ad to 36378d3 Compare October 15, 2023 14:45
@phlptp
phlptp merged commit bc8a024 into CLIUtils:main Oct 27, 2023
@phlptp
phlptp deleted the multiline_string_config branch October 27, 2023 21:31
@github-actions github-actions Bot added the needs changelog Hasn't been added to the changelog yet label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs changelog Hasn't been added to the changelog yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant