Skip to content

Commit

Permalink
parse: fix aligning if failed to parse color
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni500github committed Oct 26, 2024
1 parent 44c9631 commit 693822a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ std::optional<std::string> parse_color_tag(Parser& parser, parse_args_t& parse_a
else
{
error("PARSER: failed to parse line with color '{}'", str_clr);
if (!parse_args.parsingLayout && tagpos != std::string::npos)
parse_args.pureOutput.erase(tagpos, taglen);
return output;
}
}
Expand Down Expand Up @@ -543,6 +545,8 @@ std::optional<std::string> parse_color_tag(Parser& parser, parse_args_t& parse_a
else
{
error("PARSER: failed to parse line with color '{}'", str_clr);
if (!parse_args.parsingLayout && tagpos != std::string::npos)
parse_args.pureOutput.erase(tagpos, taglen);
return output;
}
}
Expand Down

0 comments on commit 693822a

Please sign in to comment.