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

[style-guide] Guidance for code quotations #661

Closed
dawedawe opened this issue Apr 30, 2022 · 1 comment · Fixed by dotnet/docs#29234
Closed

[style-guide] Guidance for code quotations #661

dawedawe opened this issue Apr 30, 2022 · 1 comment · Fixed by dotnet/docs#29234

Comments

@dawedawe
Copy link
Contributor

Currently the F# style guide lacks guidance for code quotations. This causes issues for Fantomas.
See 2211 for more background, especially nojaf's example.

So let's change that.
We suggest to put the delimiter symbols (<@ , @>, <@@, @@>) on separate lines if the quoted expression is a multi-line expression like:

<@
    let f x = x + 10
    f 20
@>

and to keep everything in one line for single-line expressions like:

<@ 1 + 1 @>

(Assuming the expression fits in one line.)
The language reference is using this style for the most part, too.
I'd be happy to create the needed pull requests after we have come to a conclusion on this issue.

@dsyme
Copy link
Contributor

dsyme commented May 1, 2022

I agree with this

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

Successfully merging a pull request may close this issue.

3 participants