We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
class A { f() { var a = { b: 1, c: 'def' }; }; };
If I place my cursor at the front of the word 'b' in the above block, and I execute js2r-contract-node-at-point, I receive the following:
Calling it again from the same spot returns the expected output:
I assumed it was due to some cutomization I'd made, but decided to try it without any of my startup scripts today and got that result.
The text was updated successfully, but these errors were encountered:
I'm using tabs and spaces, and that seems to be sufficient to cause the problem. The following is tab indented once, and uses spaces for alignment:
var a = { b: 1, c: 'def' };
It results in:
It seems the problem is with js2r--ensure-just-one-space. Executing from behind the curly brace with the below string:
};
results in:
whereas it should clear the newline (and does if it's spaces instead of a tab).
This is the function that's being called:
(defun js2r--ensure-just-one-space () (interactive) (while (or (looking-at "\s*\n") (looking-back "\n\s*")) (when (looking-at "\n") (delete-char 1)) (when (looking-back "\n\s") (backward-char) (delete-char -1)) (just-one-space)) (just-one-space))
Is \s in those regexs matching a single space, or all whitespace characters?
Sorry, something went wrong.
No branches or pull requests
If I place my cursor at the front of the word 'b' in the above block, and I execute js2r-contract-node-at-point, I receive the following:
Calling it again from the same spot returns the expected output:
I assumed it was due to some cutomization I'd made, but decided to try it without any of my startup scripts today and got that result.
The text was updated successfully, but these errors were encountered: