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

Clean up XHP region properties #25

Open
Wilfred opened this issue May 10, 2019 · 3 comments
Open

Clean up XHP region properties #25

Wilfred opened this issue May 10, 2019 · 3 comments

Comments

@Wilfred
Copy link
Contributor

Wilfred commented May 10, 2019

Currently we set text properties but never remove them, resulting in modified code incorrectly being considered XHP.

@Wilfred
Copy link
Contributor Author

Wilfred commented Jun 17, 2019

As of c2c032e, a workaround is to restart hack-mode (i.e. M-x hack-mode) when this occurs.

@Wilfred
Copy link
Contributor Author

Wilfred commented Apr 10, 2020

I'm struggling to replicate this. Will reopen if I see it happen again.

@Wilfred Wilfred closed this as completed Apr 10, 2020
@Wilfred
Copy link
Contributor Author

Wilfred commented May 12, 2020

OK, I can replicate.

// This will run, but it's not doing what the user expects. We never
// pass arguments to entry points.
<<__EntryPoint>>
function bad_variadic(mixed ...$_): void {}

Insert this into a file. Next, start typing a <?hh header before hand. Observe that the highlighting of __EntryPoint breaks.

@Wilfred Wilfred reopened this May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant