Skip to content
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
@leagris

Description

@leagris

Prerequisites

Description

Shell arithmetic syntax highlighting breaks on multiple cases:

  1. Base marker base# is treated as a comment marker
  2. When base marker is turned into a comment, the following lines, variables are not highlighted.
  3. Parenthesis in arithmetic expression breaks the (( )) delimiters detection.

Steps to Reproduce

  1. 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:

image

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions