Skip to content

Commit

Permalink
encoding/toml: mimic indented CUE multi-line strings in test strings
Browse files Browse the repository at this point in the history
This way, when we start reporting positions in errors,
we use line and column numbers that visually make sense for the reader,
rather than always beginning from the second line and indentation.

Note that we indent the closing quote by one more level,
to match CUE's indentation semantics for multiline strings.

No change in the test results here; this change is separated to make
reviewing the following patches easier.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I1bf6f9422b623c4c6458290b448efde9330b7d88
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199024
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mvdan committed Aug 7, 2024
1 parent c15144f commit 1ec257c
Showing 1 changed file with 94 additions and 77 deletions.
Loading

0 comments on commit 1ec257c

Please sign in to comment.