ducminh-phan / reformat-gherkin

Formatter for Gherkin language
MIT License
24 stars 13 forks source link

Fix doc string indentation #50

Closed dcendents closed 2 years ago

dcendents commented 2 years ago

Description

Fix doc string indentation as per the specification: https://cucumber.io/docs/gherkin/reference/

Fixes #49

Type of change

Please delete options that are not relevant.

rayjolt commented 2 years ago

You also need to update the unit tests - that is why the CI is failing. For example, in tests/data/valid/doc_string_escape/expected_default.feature the docstrings are indented incorrectly, and because of this the unit tests fail with your new correct docstring indentation. The same goes for other subfolders in the tests/data/valid/ folder.

Also, it would probably be a good idea to add a test case where the docstring indentation is fixed. You can do this by adding a new folder to tests/data/valid/ with appropriately named files. You can name the files either input.feature for the input file, or expected_*.feature, where expected_* is one of the keys in FILENAME_OPTION_MAP.

ducminh-phan commented 2 years ago

Closed as #49 was fixed in commit 82e483c9e37580a61c12356a08bf5b81bc3b5088