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

Unclosed parentheses in MySQL string breaks highlighting #375

Open
1 task done
0b10011 opened this issue Dec 5, 2019 · 1 comment
Open
1 task done

Unclosed parentheses in MySQL string breaks highlighting #375

0b10011 opened this issue Dec 5, 2019 · 1 comment

Comments

@0b10011
Copy link

0b10011 commented Dec 5, 2019

Prerequisites

Description

Failing to close parentheses in a MySQL string causes syntax highlighting to break (it remains in "string" mode).

Steps to Reproduce

  1. Create a new file with the contents:
    <?php
    
    // Unclosed parentheses break highlighting
    echo "SELECT ()"; // This is a comment :)
    echo "SELECT ( "; // This is a comment? Hack to fix: ")";
    
    // Closing parentheses in different type of quote breaks highlighting
    echo "SELECT (".")"; // This is a comment :)
    echo "SELECT (".')'; // This is a comment? Hack to fix: ")";
  2. Change the syntax highlighting mode to "PHP"

Expected behavior:

  • Comments in all four examples should all highlight as comments
  • First semicolon in each example should highlight as such
  • Closing parenthesis in last example (echo "SELECT (".')'; ///...) should highlight as a closing parentheses (or a basic string if saving state between MySQL statements proves difficult)
  • Period in third and fourth examples should highlight as such

Actual behavior:

  • First semicolon and comments in second and fourth example are highlighted as strings
  • Closing parenthesis in fourth example is highlighted as a normal string
  • Period in third and fourth examples is highlighted as a string

Reproduces how often:

100%

Versions

$ atom --version
Atom    : 1.41.0
Electron: 4.2.7
Chrome  : 69.0.3497.128
Node    : 10.11.0

$ apm --version
apm  2.4.3
npm  6.2.0
node 10.2.1 x64
atom 1.41.0
python 2.7.17rc1
git 2.20.1

OS: Pop!_OS 19.10

Additional Information

@0b10011
Copy link
Author

0b10011 commented Dec 5, 2019

Oh, forgot to add: this may be related to #331

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants