added highlighted stringify as a public method#120
added highlighted stringify as a public method#120jeremy-rifkin merged 2 commits intojeremy-rifkin:mainfrom riogu:main
Conversation
jeremy-rifkin
left a comment
There was a problem hiding this comment.
Thanks so much for taking the time to do this! Looks good to me, a couple quick comments below
| std::string highlight(std::string_view expression); | ||
| template<typename T> |
There was a problem hiding this comment.
Minor readability thing: Can you add a new line between these two methods
src/assert.cpp
Outdated
|
|
||
| namespace libassert { | ||
|
|
||
| [[nodiscard]] std::string highlight(std::string_view expression) { |
There was a problem hiding this comment.
Instead of throwing this at the top of the file, a better place for it would probably be the section around line 360 where color scheme stuff is defined (in general I try to keep the same organization between header and source though I'm not always as diligent about it as I'd like)
src/assert.cpp
Outdated
| namespace libassert { | ||
|
|
||
| [[nodiscard]] std::string highlight(std::string_view expression) { | ||
| return libassert::detail::highlight(expression, libassert::color_scheme::ansi_rgb); |
There was a problem hiding this comment.
Since this is in namespace libassert these don't have to be qualified with libassert::
There was a problem hiding this comment.
i submitted another commit with the changes 👍
No description provided.