This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Shell arithmetic syntax highlight breaks on multiple cases #148
Open
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Shell arithmetic syntax highlighting breaks on multiple cases:
- Base marker
base#
is treated as a comment marker - When base marker is turned into a comment, the following lines, variables are not highlighted.
- Parenthesis in arithmetic expression breaks the
((
))
delimiters detection.
Steps to Reproduce
- Edit the following Bash script:
#!/usr/bien/env bash
echo "$((16#ff))" # base# handled as comment marker
echo "$((a=16#ff))" # variable highlighted ok
a=42 # variable highlighted ok
((a=42)) # variable not highlighted
a=42 # variable highlighted ok
((a=16#ff)) # variable not highlighted
a=42 # breaks further highlighting
a="$((~(-1 << 8)))" # parenthesis highlight broken
Expected behavior:
Same correct highlighting as sample code above as shown in github
Actual behavior:
Reproduces how often:
100% reproducible
Versions
Versions
- OS : Ubuntu 19.04
- Atom : 1.38.2
- Electron: 2.0.18
- Chrome : 61.0.3163.100
- Node : 8.9.3
- apm 2.1.7
- npm 6.2.0
- node 8.9.3 x64
- atom 1.38.2
- python 2.7.16
- git 2.20.1
Additional Information
none