internal/core/convert: split the cue tag commas after the last quote
This allows the package to support Go field tags such as:
Letters string `json:"letters,omitempty" cue:"=~\"^[a-z](,[a-z])*$\",opt"`
The previous code would split at the first comma, inside the regular
expression, which would break the CUE expression.
There are multiple ways to fix this problem, but since the trailing
options do not currently contain any quotes, it's easiest to only split
by commas after the last quote character, if there is any.
Fixes #1887.
Closes #2187 as merged.
Signed-off-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I4ca1b28aa942667bf1ee07e74ac4ad93de693562
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/552623
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
authored by