Skip to content

Commit a495380

Browse files
authored
fixed linebreak in type parameter, fixes #494 (#507)
* fixed linebreak in type parameter, fixes #494
1 parent b8f7047 commit a495380

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## dev branch / next version (1.x.x)
44

5+
## version 1.8.0 (2019-06-13)
6+
57
- Added `sameLine.returnBodySingleLine`, fixes [#303](https://github.com/HaxeCheckstyle/haxe-formatter/issues/303) ([#483](https://github.com/HaxeCheckstyle/haxe-formatter/issues/483))
68
- Added `emptyLines.*.existingBetweenFields`, fixes [#455](https://github.com/HaxeCheckstyle/haxe-formatter/issues/455) ([#484](https://github.com/HaxeCheckstyle/haxe-formatter/issues/484))
79
- Added printing config filename in verbose mode, fixes [#460](https://github.com/HaxeCheckstyle/haxe-formatter/issues/460) ([#493](https://github.com/HaxeCheckstyle/haxe-formatter/issues/493))
@@ -19,6 +21,7 @@
1921
- Fixed nested inline array comprehension, fixes [#498](https://github.com/HaxeCheckstyle/haxe-formatter/issues/498) ([#501](https://github.com/HaxeCheckstyle/haxe-formatter/issues/501))
2022
- Fixed incorrect comment closing, fixes [#500](https://github.com/HaxeCheckstyle/haxe-formatter/issues/500) ([#501](https://github.com/HaxeCheckstyle/haxe-formatter/issues/501))
2123
- Fixed imports with conditionals, fixes [#504](https://github.com/HaxeCheckstyle/haxe-formatter/issues/504) ([#505](https://github.com/HaxeCheckstyle/haxe-formatter/issues/505))
24+
- Fixed line break in type parameters, fixes [#494](https://github.com/HaxeCheckstyle/haxe-formatter/issues/494) ([#507](https://github.com/HaxeCheckstyle/haxe-formatter/issues/507))
2225
- Changed `sameLine.returnBody` to only apply to multiline or loop/switch/try/if expressions, fixes [#303](https://github.com/HaxeCheckstyle/haxe-formatter/issues/303) ([#483](https://github.com/HaxeCheckstyle/haxe-formatter/issues/483))
2326

2427
## version 1.7.1 (2019-06-01)

haxelib.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"style"
99
],
1010
"description": "A code formatter for Haxe",
11-
"version": "1.7.1",
12-
"releasenote": "Bugfixes - see CHANGELOG for details.",
11+
"version": "1.8.0",
12+
"releasenote": "Added same line options, empty lines options and an indentation setting for case labels and bugfixes - see CHANGELOG for details.",
1313
"contributors": [
1414
"AlexHaxe",
1515
"Gama11"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "haxe-formatter",
3-
"version": "1.7.1",
3+
"version": "1.8.0",
44
"description": "A code formatter for Haxe",
55
"repository": {
66
"type": "git",

src/formatter/marker/wrapping/MarkWrappingBase.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,11 @@ class MarkWrappingBase extends MarkerBase {
621621
return endToken;
622622
}
623623
switch (next.token.tok) {
624+
case Binop(OpGt):
625+
if (next.token.access().parent().is(Binop(OpLt)).exists()) {
626+
return endToken;
627+
}
628+
return findItemEnd(next.token);
624629
case Binop(_):
625630
return findItemEnd(next.token);
626631
case CommentLine(_), Comment(_):
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{}
2+
3+
---
4+
5+
typedef HaxeRequestMethod<TParams, TResponse> = RequestMethod<TParams, TResponse, ResponseErrorData>;
6+
typedef HaxeRequestMethod<TParams, TResponse, ResponseErrorData,TParams, TResponse, ResponseErrorData> = RequestMethod<TParams, TResponse, ResponseErrorData, TParams, TResponse, ResponseErrorData>;
7+
8+
typedef HaxeNotificationMethod<TParams> = NotificationMethod<TParams>;
9+
10+
---
11+
12+
typedef HaxeRequestMethod<TParams, TResponse> = RequestMethod<TParams, TResponse, ResponseErrorData>;
13+
14+
typedef HaxeRequestMethod<TParams, TResponse, ResponseErrorData, TParams, TResponse,
15+
ResponseErrorData> = RequestMethod<TParams, TResponse, ResponseErrorData, TParams, TResponse, ResponseErrorData>;
16+
17+
typedef HaxeNotificationMethod<TParams> = NotificationMethod<TParams>;

0 commit comments

Comments
 (0)