kamadorueda / alejandra

The Uncompromising Nix Code Formatter

Home Page:https://kamadorueda.github.io/alejandra/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

double-asterisk in block comment opening delimiter forced onto separate lines

montchr opened this issue · comments

https://kamadorueda.com/alejandra/?before=%7B%0A++%2F**%0A++Convert+a+boolean+to+a+%22yes%22+or+%22no%22+string.%0A%0A++Commonly+useful+in+program+configuration+files.%0A%0A++Type%3A+boolToOnOffString+%3A%3A+boolean+-%3E+string%0A++*%2F%0A++boolToOnOffString+%3D+value%3A%0A++++if+value%0A++++then+%22on%22%0A++++else+%22off%22%3B%0A%7D

Expected

{
  /**
  Convert a boolean to a "yes" or "no" string.

  Commonly useful in program configuration files.

  Type: boolToOnOffString :: boolean -> string
  */
  boolToOnOffString = value:
    if value
    then "on"
    else "off";
}

Actual

{
  /*
    *
  Convert a boolean to a "yes" or "no" string.

  Commonly useful in program configuration files.

  Type: boolToOnOffString :: boolean -> string
  */
  boolToOnOffString = value:
    if value
    then "on"
    else "off";
}

I am aware of RFC 0145, but I intentionally retained the first-level indentation of the comment body since this issue is about /** specifically