Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken syntax highlighting when missing closing parenthesis character in query string #11

Open
syrsly opened this issue Oct 24, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@syrsly
Copy link

syrsly commented Oct 24, 2023

Also posted to Pulsar issues at pulsar-edit/pulsar#787

Description

When the "language-php" package is enabled and I'm in a PHP script, if I create a "(" character but don't close it, this screws up the formatting for everything after it for the rest of the script, whether it's 10 lines or 7000 lines and regardless of whether or not I later close the parenthesis.

This seems like it's an issue that's been around and mentioned before in the Atom issues, but since it hasn't been addressed in years and is now an issue in Pulsar, I figured I should mention it.

I propose that we add some kind of logic to the language-php package that says, if we can't find a closing parenthesis character ")" by the end of the line, we reset the formatting to normal.
Could also add some kind of toggle to turn off the string formatting in case it annoys anyone.

Steps to Reproduce

  1. Enable language-php package with default settings,
  2. open a php file,
  3. insert a string variable with the start of parenthesis "(" character in the string,
  4. create more lines of code after this string and notice the later lines are all appearing to be part of the string.

Expected behavior: Proper syntax highlighting!

Actual behavior: Broken highlighting/coloring of rest of code in script.

Reproduces how often: 100% of the time. Easily reproducible.

Versions

Pulsar 1.110.0 as well at the last version of Atom before it was sunsetted.

Additional Information

Image below taken from old issue at atom#442
firefox_bwiaLfRVHw

@KapitanOczywisty
Copy link
Owner

This is known issue, and unfortunately rather hard to fix.

@syrsly
Copy link
Author

syrsly commented Oct 26, 2023

This is known issue, and unfortunately rather hard to fix.

Even if it's a known issue, it keeps getting waved away as too hard to fix, and if people don't reopen the issue like I did, it'll continually get ignored.

What specifically makes it hard to fix? Is there a known workaround other than just not having incomplete query strings? Incomplete strings are necessary logic pieces for a query builder script.

@KapitanOczywisty KapitanOczywisty added the bug Something isn't working label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants