[x] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.
Environment*
Operating System: macOS Sonoma 14.5
Visual Studio Code Version: 1.91.1 (Universal)
LaTeX Workshop Version: 10.1.0
TeX Distribution Version: TeX Live 2024
The Issue*
When adjusting spacing for section titles using the titlesec package the structure view picks up unwanted commands
Reproduction Steps
Run the following MWE:
\documentclass{book}
\usepackage{titlesec}
\titlespacing\section{20pt}{12pt plus 4pt minus 2pt}{20pt plus 2pt minus 2pt}
\begin{document}
\chapter{Chapter}
\section{Section}
Some text.
\end{document}
Expected Behavior
I would expect the \sectionafter the \titlespacing to be ignored in the structure view
Pre-checks*
Environment*
The Issue*
Reproduction Steps
Expected Behavior
\section
after the\titlespacing
to be ignored in the structure view