texstudio
texstudio copied to clipboard
keyvals with spaces in "val" part marked incorrect
Environment
- TeXstudio: 4.3.0alpha1
- Qt: 6.3.0
- OS: Windows 10
- TeX distribution: miktex
Expected behavior
For keyvals with cwl listing of the form key=#val1,val2,..., the completer recognizes values with spaces, but when actually filled in they're marked as incorrect. For the cwl
# mypackage.cwl
\foo{keyvals}
#keyvals:\foo
key=#val,my val,anotherval,yet another val
#endkeyvals
the completer works fine:
Actual behavior
When filled in, the values with spaces are marked as incorrect:
Here's the listing for the last picture:
\documentclass{article}
\usepackage{mypackage}
\begin{document}
\foo{key=val}
\foo{key=my val}
\foo{key=anotherval}
\foo{key=yet another val}
\end{document}
I'll note this comes up in many places, e.g. the numbered key in thmtools:
what is the real scenario, where this plays a role ?
Defining keyvals like this only seems to come up in tikz/pgfkeys packages, in which case the cwl listing usually has a #c anyways. I suppose this should be a FR or enhancement rather than a bug report.