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

Reformat code breaks new pure functions shortcut |-> #189

Open
gdelfino opened this issue Aug 27, 2021 · 1 comment
Open

Reformat code breaks new pure functions shortcut |-> #189

gdelfino opened this issue Aug 27, 2021 · 1 comment
Assignees

Comments

@gdelfino
Copy link

gdelfino commented Aug 27, 2021

Describe the bug
Since WL 12.2 we can write pure functions like this:

x |-> x+1

when this code is reformatted, a space is inserted after the vertical bar effectively introducing a bug in the code:

x | -> x+1

To Reproduce
Steps to reproduce the behaviour:

  1. Select code that includes a pure function with the new notation
  2. Select "Format Code" from the "Code" menu or press ALT-CTRL-L or

Expected behaviour
The sequence of three characters: |-> should be treated as a single character. In fact is shown as a single character with fonts such as JetBrains Mono when ligatures are enabled.

Please also provide:

  • OS: Windows 10
  • IntelliJ IDEA 2021.2.1
  • Wolfram Plugin Version 2021.2-beta-1
@halirutan
Copy link
Owner

Yes, the new operators and syntax are still not incorporated into the parser which leads to operators not being recognized correctly. I have access to the latest Mathematica versions now and can start fixing things up.

Related: #190, #191

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

2 participants