atom / bracket-matcher

Jump to brackets
MIT License
142 stars 98 forks source link

Brackets not matched inside LaTeX environments #293

Closed edwinksl closed 7 years ago

edwinksl commented 7 years ago

Prerequisites

Description

The brackets inside LaTeX environments such as equation and align are not matched.

Steps to Reproduce

As a minimal example, consider the LaTeX file given below where I provide comments about whether the brackets are matched.

\documentclass{report}  % braces are matched

\begin{document}  % braces are matched

(a) = 1.  % parentheses are matched

$(a) = 1$.  % parentheses are NOT matched

\begin{equation}  % braces are matched
  (a) = 1.  % parentheses are NOT matched
\end{equation}  % braces are matched

\begin{align}  % braces are matched
  (a) = 1.  % parentheses are NOT matched
\end{align}  % braces are matched

\end{document}  % braces are matched

However, if I run Atom in safe mode by running atom-beta --safe, then the previously unmatched brackets are matched correctly.

Expected behavior: Parentheses inside LaTeX environments such as equation and align are matched.

Actual behavior: They are not matched.

Reproduces how often: 100% of the time.

Versions

You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.

$ atom-beta --version
Atom    : 1.19.0-beta1
Electron: 1.6.9
Chrome  : 56.0.2924.87
Node    : 7.4.0
$ apm-beta --version
apm  1.18.2
npm  3.10.10
node 6.9.5 x64
python 2.7.13
git 2.13.0
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

$ apm-beta list -ib
atom-beautify@0.30.2
auto-indent@0.5.0
autocomplete-python@1.8.64
busy-signal@1.4.3
file-icons@2.1.7
highlight-line@0.12.0
highlight-selected@0.13.1
hyperclick@0.0.40
indent-guide-improved@1.4.13
ink@0.7.4
intentions@1.1.2
julia-client@0.6.0
language-cython@0.3.0
language-generic-config@1.3.0
language-julia@0.11.0
language-latex@1.0.0
language-markdown@0.23.0
language-matlab@0.2.1
language-restructuredtext@1.1.0
latex@0.44.0
latex-completions@0.3.2
latexer@0.3.0
latextools@0.8.5
linter@2.2.0
linter-chktex@1.3.1
linter-csslint@1.3.4
linter-flake8@2.2.1
linter-julia@0.7.2
linter-markdown@4.0.1
linter-matlab@1.1.0
linter-ui-default@1.6.1
markdown-preview-plus@2.4.9
markdown-scroll-sync@2.1.2
pdf-view@0.59.0
python-tools@0.6.9
todo-show@1.11.0
tool-bar@1.1.0
uber-juno@0.1.2
wordcount@2.10.4
50Wliu commented 7 years ago

We purposely do not match brackets inside strings. See #274 for the enhancement request.