Menu

#2221 lex-latex: %\end{comment} inside \begin{comment} environment

Bug
open-accepted
nobody
5
2020-11-14
2020-10-26
FB
No

When lexing LaTeX, the {comment} environment is handled specially. However, the code fails to handle line-comments starting with '%' and therefore treats Text in the following snippet as non-commented since it assumes the second line would end the {comment}.

\begin{comment}
%\end{comment}
Text

The attached patch against Scintilla v3.10.4 (the version Geany uses, for which I fixed this bug) also applies cleanly to v4.4.5.

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2020-10-27
    • labels: --> lexilla, latex
    • status: open --> open-accepted
     
  • Neil Hodgson

    Neil Hodgson - 2020-10-27

    Due to the current focus on Scintilla 5.0, this will not be integrated until after the release of 5.0.

    There should be an example that shows the change's effect similar to scintilla/lexilla/test/examples/latex/Feature1358.tex and its corresponding .styled lexed result. See scintilla/lexilla/test/README for information on building and running tests. This will ensure that the change works and is not reverted by future changes.

     
  • FB

    FB - 2020-11-14

    I can live with the delay and continue to patch my version locally.

    Thanks for sharing these details about scintilla/lexilla/test. Not sure what to do with this information though since I have no idea about the internal test infrastructure and do not use it either, sorry. This is just a bug report showing a minimal test case and offering a way to fix the issue, which works for me. :)

     

Log in to post a comment.