aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/print.cc
diff options
context:
space:
mode:
authorRebecca Turner <rbt@sent.as>2024-03-28 16:26:42 -0700
committerjade <lix@jade.fyi>2024-04-03 16:25:54 +0000
commitea10fe7ab0df085b51189adabdb079fc4442c6be (patch)
tree7183a388ed91b09978fe333b880985ef3c2ed49f /src/libexpr/print.cc
parent56c7dfd65290dea957de6fad4e2df26f1630e407 (diff)
Add `EscapeStringOptions` and `escapeString` tests
Change-Id: I86ead2f969c9e03c9edfa51bbc92ee06393fd7d6
Diffstat (limited to 'src/libexpr/print.cc')
-rw-r--r--src/libexpr/print.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc
index e5e6b9b21..8d7e2ab34 100644
--- a/src/libexpr/print.cc
+++ b/src/libexpr/print.cc
@@ -198,12 +198,14 @@ private:
void printString(Value & v)
{
- // NB: Non-printing characters won't be escaped.
escapeString(
output,
v.string.s,
- options.maxStringLength,
- options.ansiColors
+ {
+ .maxLength = options.maxStringLength,
+ .outputAnsiColors = options.ansiColors,
+ // NB: Non-printing characters won't be escaped.
+ }
);
}