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

Curly braces in \verb cause an error #828

Open
Filip62 opened this issue Dec 5, 2022 · 1 comment
Open

Curly braces in \verb cause an error #828

Filip62 opened this issue Dec 5, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Filip62
Copy link

Filip62 commented Dec 5, 2022

Hi!

With this tex file,

\documentclass[]{article}

\begin{document}

\verb|<STATEMENT>     if(<expr>){<body>else{<body>|

\end{document}

texlab provides this error message: Missing "}" inserted.

I believe this should not cause an error.
The { in \verb|...| should be ignored.

@Filip62 Filip62 changed the title Curly braces not ignored in \verb Curly braces in \verb cause an error Dec 5, 2022
@pfoerster pfoerster added the bug Something isn't working label Dec 29, 2022
@oriyia
Copy link

oriyia commented Feb 19, 2023

Hello everyone!

I also want to supplement the topic. When using the shortvrb package and setting up:
\MakeShortVerb{\|}
the symbol inside the |$| construct breaks syntax highlighting. At the same time, in the normal form \verb|$|, everything works correctly.
2023-02-19-163217_1746x553_scrot

The situation is similar with the listings package.Using the abbreviation setting:
\lstMakeShortInline[style=line]|
the short form behaves the same way.

I also noticed using \lstinline{$}, something breaks too (the backlight works fine). This shows up well if I use plugins that are based on lsp. For example, the document partitioning structure breaks down when I use such a plugin, or this.

An error also appears when using the \lstinline{%} construct:
2023-02-19-163308_1765x297_scrot

I use:

nvim --version
NVIM v0.9.0-dev-414+gef5ab2bf7
Build type: RelWithDebInfo

pfoerster added a commit that referenced this issue Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants