Skip to content

%specialDef modifier does not like new lines #4030

@mbertucci47

Description

@mbertucci47

Environment

  • TeXstudio: 4.8.6
  • Qt: 6.8.2
  • OS: Windows 11
  • TeX distribution: N/A

Expected behavior

It shouldn't matter if a label-generating command has its argument on a new line.

Actual behavior

This is true for commands in LaTeX's label/ref namespace (so #l and #r in cwls) but not for %specialDef arguments.

How to reproduce

Here's an example showing the difference.

Image

# testpkg.cwl
\newvalue{myvalue%specialDef}{text}#s#%myvalue
\usevalue{myvalue%special}
\documentclass{article}
\usepackage{testpkg}

\begin{document}

% good
\newvalue{foo}{blub blub}
\usevalue{foo}

% bad
\newvalue
  {baz}{blub blub}
\usevalue{baz}

% good
\label{foo}
\ref{foo}

% good
\label
  {baz}
\ref{baz}

\end{document}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions