{"action":"created","issue":{"url":"https://api.github.com/repos/cucumber/gherkin/issues/331","labels_url":"https://api.github.com/repos/cucumber/gherkin/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/cucumber/gherkin/issues/331/comments","events_url":"https://api.github.com/repos/cucumber/gherkin/issues/331/events","html_url":"https://github.com/cucumber/gherkin/pull/331","id":57989756,"number":331,"title":"PrettyFormatter options","user":{"login":"muhqu","id":26716,"avatar_url":"https://avatars.githubusercontent.com/u/26716?v=3","gravatar_id":"","url":"https://api.github.com/users/muhqu","html_url":"https://github.com/muhqu","followers_url":"https://api.github.com/users/muhqu/followers","following_url":"https://api.github.com/users/muhqu/following{/other_user}","gists_url":"https://api.github.com/users/muhqu/gists{/gist_id}","starred_url":"https://api.github.com/users/muhqu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muhqu/subscriptions","organizations_url":"https://api.github.com/users/muhqu/orgs","repos_url":"https://api.github.com/users/muhqu/repos","events_url":"https://api.github.com/users/muhqu/events{/privacy}","received_events_url":"https://api.github.com/users/muhqu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-17T22:05:25Z","updated_at":"2015-03-13T15:00:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cucumber/gherkin/pulls/331","html_url":"https://github.com/cucumber/gherkin/pull/331","diff_url":"https://github.com/cucumber/gherkin/pull/331.diff","patch_url":"https://github.com/cucumber/gherkin/pull/331.patch"},"body":"This PR adds 3 optional formatting options to the `PrettyFormatter`. All options default to `false` to not change the formatting result unless explicitly enabled.\r\n\r\n#### right-align numeric values in tables\r\n``` java\r\nformatter.setRightAlignNumericValues(true);\r\n```\r\n``` gherkin\r\n  Scenario: Format beautifully right-aligned numbers in a data table\r\n    When I have this table:\r\n      | name                          | value  |\r\n      | barel of extra long cucumbers | 129.95 |\r\n      | extra long cucumber           |  10.95 |\r\n      | tiny cucumber                 |   2.95 |\r\n```\r\n\r\n#### center-align step keywords\r\n``` java\r\nformatter.setCenterSteps(true);\r\n```\r\n``` gherkin\r\n  Scenario: Format beautifully center-aligned steps\r\n    Given there are 12 cucumbers\r\n     When I eat 3 cucumbers\r\n      And I throw 2 cucumbers into the trash can\r\n     Then I should have 7 cucumbers\r\n```\r\n\r\n#### preserve a single blank line between steps\r\n``` java\r\nformatter.setPreserveBlankLineBetweenSteps(true);\r\n```\r\n``` gherkin\r\n  Scenario: Repetitive when.. then..\r\n    Given there are 12 cucumbers\r\n    When I eat 3 cucumbers\r\n    Then I should have 9 cucumbers\r\n\r\n    When I eat 2 cucumbers\r\n    Then I should have 7 cucumbers\r\n\r\n    When I eat 1 cucumbers\r\n    Then I should have 6 cucumbers\r\n```"},"comment":{"url":"https://api.github.com/repos/cucumber/gherkin/issues/comments/79017981","html_url":"https://github.com/cucumber/gherkin/pull/331#issuecomment-79017981","issue_url":"https://api.github.com/repos/cucumber/gherkin/issues/331","id":79017981,"user":{"login":"muhqu","id":26716,"avatar_url":"https://avatars.githubusercontent.com/u/26716?v=3","gravatar_id":"","url":"https://api.github.com/users/muhqu","html_url":"https://github.com/muhqu","followers_url":"https://api.github.com/users/muhqu/followers","following_url":"https://api.github.com/users/muhqu/following{/other_user}","gists_url":"https://api.github.com/users/muhqu/gists{/gist_id}","starred_url":"https://api.github.com/users/muhqu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muhqu/subscriptions","organizations_url":"https://api.github.com/users/muhqu/orgs","repos_url":"https://api.github.com/users/muhqu/repos","events_url":"https://api.github.com/users/muhqu/events{/privacy}","received_events_url":"https://api.github.com/users/muhqu/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T15:00:13Z","updated_at":"2015-03-13T15:00:13Z","body":"@aslakhellesoy any chance to get this one merged?\r\n\r\nIt would be great to get this into a release so I don't have to make a copy of the `PrettyFormatter.java` in https://github.com/cucumber/cucumber-eclipse/issues/107. "}}