diff --git a/CHANGELOG.md b/CHANGELOG.md index fa79e10..cf677e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## dev branch / next version (1.x.x) - added indentOffset to support code snippets with non-zero indentation levels +- fixed line break in type parameter constraint ## version 1.17.1 (2024-10-22) diff --git a/src/formatter/marker/MarkLineEnds.hx b/src/formatter/marker/MarkLineEnds.hx index abc6819..99aa0c0 100644 --- a/src/formatter/marker/MarkLineEnds.hx +++ b/src/formatter/marker/MarkLineEnds.hx @@ -334,6 +334,7 @@ class MarkLineEnds extends MarkerBase { case Comma: case Semicolon: case Arrow: + case Binop(OpAnd): case Binop(OpAssign): case Binop(OpGt): case Const(CIdent("is")): diff --git a/test/testcases/lineends/simons_type_parameter_constraints.hxtest b/test/testcases/lineends/simons_type_parameter_constraints.hxtest new file mode 100644 index 0000000..9f06d7a --- /dev/null +++ b/test/testcases/lineends/simons_type_parameter_constraints.hxtest @@ -0,0 +1,14 @@ +{ +} + +--- + +function hasIdent(name:T):T { + return false; +} + +--- + +function hasIdent(name:T):T { + return false; +}