Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Coloring Discrepancy with EOF #144

Open
rodibin-at-placemaildotonline opened this issue May 12, 2019 · 0 comments
Open

Coloring Discrepancy with EOF #144

rodibin-at-placemaildotonline opened this issue May 12, 2019 · 0 comments
Labels

Comments

@rodibin-at-placemaildotonline
Copy link

rodibin-at-placemaildotonline commented May 12, 2019

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

@50Wliu 50Wliu added the triaged label May 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants