Skip to content

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

@gdelfino

Description

@gdelfino

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions