Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmetic improvement in printout of Payload Inspector plots for DropBoxMetaData #37288

Merged
merged 1 commit into from
Mar 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ namespace DBoxMetadataHelper {
toAppend.clear();
for (unsigned int iPath = 0; iPath < pathsPrep.size(); ++iPath) {
std::string thisString = pathsPrep[iPath];

// skip userText since we want to see actual contents, not metadata
if (thisString.find("userText") == std::string::npos) {
// if the line to be added has less than colWidth chars append to current
if ((toAppend + thisString).length() < colWidth) {
// if the line to be added has less than colWidth chars, and is not a new tag ("inputTag"), append to current
if ((toAppend + thisString).length() < colWidth && thisString.find("inputTag") != 0) {
toAppend += thisString;
} else {
// else if the line exceeds colWidth chars, dump in the vector and resume from scratch
// else if the line exceeds colWidth chars or this is a new tag ("inputTag"), dump in the vector and resume from scratch
output.push_back(toAppend);
toAppend.clear();
toAppend += thisString;
Expand All @@ -264,10 +264,10 @@ namespace DBoxMetadataHelper {

if (thisString.find("userText") == std::string::npos) {
// if the line to be added has less than colWidth chars append to current
if ((toAppend + thisString).length() < colWidth) {
if ((toAppend + thisString).length() < colWidth && thisString.find("inputTag") != 0) {
toAppend += thisString;
} else {
// else if the line exceeds colWidth chars, dump in the vector and resume from scratch
// else if the line exceeds colWidth chars or this is a new tag ("inputTag"), dump in the vector and resume from scratch
output.push_back(toAppend);
toAppend.clear();
toAppend += thisString;
Expand Down Expand Up @@ -615,13 +615,13 @@ namespace DBoxMetadataHelper {
toAppend.clear();
for (unsigned int iPath = 0; iPath < thePaths.size(); ++iPath) {
std::string thisString = thePaths[iPath];
// if the line to be added has less than colWidth chars append to current
// skip userText since we want to compare actual contents, not metadata
if (thisString.find("userText") == std::string::npos) {
// if the line to be added has less than colWidth chars append to current
if ((toAppend + thisString).length() < colWidth) {
// if the line to be added has less than colWidth chars, and is not a new tag ("inputTag"), append to current
if ((toAppend + thisString).length() < colWidth && thisString.find("inputTag") != 0) {
toAppend += thisString;
} else {
// else if the line exceeds colWidth chars, dump in the vector and resume from scrach
// else if the line exceeds colWidth chars or this is a new tag ("inputTag"), dump in the vector and resume from scratch
output.push_back("#color[" + std::to_string(color) + "]{" + toAppend + "}");
tmp += toAppend;
toAppend.clear();
Expand Down