Are docstring content-types standard or not?
bursauxa opened this issue ยท 3 comments
Hello,
The documentation on doc strings mentions that doc string delimiters must exclusively be triple quotes:
The text should be offset by delimiters consisting of three double-quote marks on lines of their own
On the other hand, the documentation from Relish allows for adding content types to doc strings, in markdown style:
It's possible to annotate the DocString with the type of content it contains. [...] You specify the content type after the triple quote
We are having a debate about this in our team right now, because of down-to-earth tooling issues:
- ๐ some of us use VS Code and its Cucumber plugin which strictly follows the first specification (its autoformat feature can auto-detect json content in docstrings and indent the docstring accordingly, but will break on any docstring with explicit content type)
- ๐ others use IntelliJ which relies on explicit content types, and will treat anything not explicitly annotated as raw strings (hence no auto-indentation of content).
- Content types on doc strings are standard and part of the gherkin test test set.
- The bits of documentation you are quoting are not contradicting each other, rather the cucumber.io docs are incomplete.
- You may want to file a bug report with VSCode to also support explicit content types.
If anybody is interested in amending the documentation feel free to do so.
Thanks for the answer, I did as you suggested @mpkorstanje and reported the issue to the VS Code extension.