You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is a feature request, but a workaround or solution would be great if one exists: an option/method to preserve leading whitespace would be desirable when markup (XML, JSON) snippets are the cell contents.
Perhaps we could have:
Format::enable_trim(bool en) { enable_trim_left(en); enable_trim_right(en) };
Format::enable_trim_left(bool);
Format::enable_trim_right(bool);
// orenumclassTrimDir{ none = 0, left = 1, right = 2, both = left | right /* remains default */};
Format::enable_trim(TrimDir);
// example usage
universal_contants.format()
.width(50)
.enable_trim(false);
// or
universal_contants.format()
.width(50)
.enable_trim(TrimDir::right); // better for JSON formatting
?
Not sure I can think of a good use case for keeping trailing whitespace... but there's probably one somewhere?
The text was updated successfully, but these errors were encountered:
I don't think there's any existing solution. I came across exactly the same problem. The way I dealt with it is commenting the invocation of trim_left functions.
I believe this is a feature request, but a workaround or solution would be great if one exists: an option/method to preserve leading whitespace would be desirable when markup (XML, JSON) snippets are the cell contents.
Perhaps we could have:
?
Not sure I can think of a good use case for keeping trailing whitespace... but there's probably one somewhere?
The text was updated successfully, but these errors were encountered: