Closed joallard closed 6 years ago
I personally don't like features. I would probably took different approach. But anyway it is definitely an improvement to the current state of things, so let me merge this!
Btw I stuck for a second under the example with list trying to understand why it renders only 4 and 5, but not 1,2,3. I anticipate a lot of people gonna have problems accepting this behavior :)
Another possibility in my book would have been Yaml files with hamd: / html:
pairs, I'll admit the Gherkin format is a little verbose. At the same time, it has some nifty features where you can reuse definitions, and it forces you to document a little. Still, if someone has a better idea and this serves as a starting point, perfect.
Same thing for ambiguous characters (oops, I didn't expect it to become part of the PR!). Starting point, great if someone comes along and improves it.
Cheers!
The first step towards a proof on concept is some kind of formal examples.
I thought about what would be a reasonable format to store (hamd -> html) expectation pairs. (1) I want both parts to be in the same file. (2) If I'm going to run these at some point, I don't want to have to code up a custom parser for these files.
Gherkin features allow both parts to be in the same file, and provides ready-made tools so that the glue around those features is easy to get. (Writing these step definitions shouldn't be long; runners already exist.) I would've liked syntax highlighting à la GFM-Markdown code blocks, but alas. (besides, that would've only worked for Html, not Hamdown yet ;o)