Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming Commands fails when they occur with subscript #990

Closed
svdwall opened this issue Jan 8, 2024 · 0 comments · Fixed by #991
Closed

Renaming Commands fails when they occur with subscript #990

svdwall opened this issue Jan 8, 2024 · 0 comments · Fixed by #991

Comments

@svdwall
Copy link

svdwall commented Jan 8, 2024

\documentclass{article}

\newcommand{\asd}{asd}

\begin{document}
$\asd_{\asd}$
\end{document}

Invoking rename from \asd into \asda results in

\documentclass{article}

\newcommand{\asda}{asd}

\begin{document}
$\asd_{\asda}$
\end{document}

So the \asd_ was not changed to \asda_.

When I scrolled through the code I found this part, which I believe might cause the \asd_ to be considered a different command than \asd.

'@' | ':' | '_' => {
lexer.bump(c.len_utf8());

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 25, 2024
## [5.12.2] - 2024-01-20

### Fixed

- Fix parsing commands when they are used with subscript ([#990](latex-lsp/texlab#990))
- Don't append a newline each time a BibTeX document is being formatted ([#996](latex-lsp/texlab#996))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant