Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-line strings delimiters for documentation metadata #322

Closed
yannham opened this issue Mar 11, 2021 · 0 comments · Fixed by #326
Closed

Support multi-line strings delimiters for documentation metadata #322

yannham opened this issue Mar 11, 2021 · 0 comments · Fixed by #326
Assignees

Comments

@yannham
Copy link
Member

yannham commented Mar 11, 2021

Is your feature request related to a problem? Please describe.
Currently, specifying a documentation on a field is done by writing a static string delimited by double quotes. This becomes annoying when the documentation contains code and examples that themselves involve strings, since one then has to escape quotes. The semantics is not really clear at first sight:

item | doc "
         # Usage

         Example of usage: `let str = \"some str\" in item str`
       "
[...]

Describe the solution you'd like
Support the same set of delimiters as for normal strings, such as variable length delimiters, for documentation as well:

item | doc m#"
         # Usage

         Example of usage: `let str = "some str" in item str`
       "#m
[...]

Describe alternatives you've considered
Using different delimiters for documentation, like several consecutive (double) quotes, as in say Python docstrings. However, the issue of not clashing with delimiters is exactly the same as for normal strings, and we've already solved it, so it doesn't really make sense to do something different here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant