Skip to content

Commit

Permalink
Allow stripping unclosed color tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg authored Jul 29, 2020
1 parent bc3aee1 commit 75bf82d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ std::string remove_color_tags( const std::string &s )
std::vector<size_t> tag_positions = get_tag_positions( s );
size_t next_pos = 0;

if( tag_positions.size() > 1 ) {
if( !tag_positions.empty() ) {
for( size_t tag_position : tag_positions ) {
ret += s.substr( next_pos, tag_position - next_pos );
next_pos = s.find( ">", tag_position, 1 ) + 1;
Expand Down

0 comments on commit 75bf82d

Please sign in to comment.