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.

Coloring Discrepancy with EOF #144

Open

Description

Prerequisites

Description

Coloring gets whack

Steps to Reproduce

  1. Add this code to atom (runs fine)
#!/system/bin/sh

function parse_plex() {
    read -r -d '' pyfunc <<-"----EOF"
        print("test")
----EOF
    python -c $pyfunc
}

PY_RESULT='command -v python3'
  if [ "${PY_RESULT:-null}" = null ]; then
    echo "$LOG_DATE: Python is not installed, trying a regex..." &
      PLX_IP=$(
        curl -b ${MN_DIR}/plexcookie.txt "https://plex.tv/pms/resources.xml?includeHttps=1&X-Plex-Token=${PLX_TOK}" | \
        grep 'local="1"' | \
        sed 's/.*uri=\"\([^\"]*\)\"\slocal.*/\1/g' | \
        tail -n 1)
  else
    echo "$LOG_DATE: Python is installed, parsing Plex XML with python..." &
    parse_plex
  fi
  1. Look at text below the last ----EOF
  2. Coloring is incorrect
  3. Break code by adding a quote " to the end of the last ----EOF so it reads ----EOF" OR remove the parentheses around ("test")
  4. Coloring becomes correct, but code gets broken

Expected behavior: Syntax is properly picked up and coloring remains the same

Actual behavior: Coloring changes. Please see here if you'd like an explanation of the code

Reproduces how often: 100%

Versions

MacOS 10.14.4

Atom : 1.36.1
Electron: 2.0.18
Chrome : 61.0.3163.100
Node : 8.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions