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

Quickfix to avoid parse errors in verbatim environments #1353

Merged
merged 18 commits into from
Apr 18, 2020

Conversation

PHPirates
Copy link
Collaborator

@PHPirates PHPirates commented Apr 15, 2020

Part of #101

Syntax highlighting of \end in verbatim environments is wrong: haven't found yet where exactly this highlighting is done

Summary of additions and changes

  • Add a heap of lexer states to go into and out of a verbatim lexer state. Also uses a token remapper to clean up leftover \end{ and whitespace which should be raw text.
  • Removed inspection which warns for verbatim, one of the quickfixes is a new intention

How to test this pull request

            \begin{verbatim}
                $
                \end{no verbatim} }
                \begin{alsonoverbatim}
            \end{verbatim}
            
            $ math$

@PHPirates PHPirates added this to the b0.6.10 milestone Apr 15, 2020
@PHPirates PHPirates self-assigned this Apr 15, 2020
Copy link
Collaborator

@slideclimb slideclimb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • \end{} inside verbatim (with empty argument) causes parse error
  • Enter on verbatim autocompletion creates two new lines

@PHPirates PHPirates requested a review from slideclimb April 17, 2020 08:02
# Conflicts:
#	gen/nl/hannahsten/texifyidea/grammar/LatexLexer.java
#	src/nl/hannahsten/texifyidea/grammar/LatexLexer.flex
@PHPirates PHPirates merged commit 1e078fd into master Apr 18, 2020
@PHPirates PHPirates deleted the verbatim-environment branch April 18, 2020 15:19
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 this pull request may close these issues.

2 participants