docs(encoder): correct the multi-line string claim
Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
+3
-4
@@ -412,10 +412,9 @@ omitted, because TOML forbids an empty `[[a]]`. Other empty arrays emit as
|
||||
### Long strings
|
||||
|
||||
By default every string is emitted as a basic `"..."` string with the escapes
|
||||
TOML requires, and a string containing a newline is emitted as an escaped
|
||||
multi-line basic string. `UseLiteralMultiline(threshold)` switches strings that
|
||||
contain a newline and are at least `threshold` bytes long to the literal
|
||||
`'''...'''` form, which carries the newlines verbatim:
|
||||
TOML requires, a newline among them as `\n`. `UseLiteralMultiline(threshold)`
|
||||
switches strings that contain a newline and are at least `threshold` bytes long
|
||||
to the literal `'''...'''` form, which carries the newlines verbatim:
|
||||
|
||||
```go
|
||||
out, err := interpres.NewEncoder().UseLiteralMultiline(80).Marshal(cfg)
|
||||
|
||||
Reference in New Issue
Block a user