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

Some displayed examples may have broken indendation #850

Closed
aski-codes opened this issue Oct 10, 2023 · 11 comments · Fixed by #851
Closed

Some displayed examples may have broken indendation #850

aski-codes opened this issue Oct 10, 2023 · 11 comments · Fixed by #851

Comments

@aski-codes
Copy link

aski-codes commented Oct 10, 2023

Hi, the example here (List.concat) is seemingly not working, however this is due to messed up indentation. The source looks correct, so it's likely an issue with the rendering.

billede

https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-listmodule.html#concat

@nojaf
Copy link
Collaborator

nojaf commented Oct 10, 2023

Hi there,

Are you sure?

image

I was able to copy the code and paste it just fine in F# interactive.

@nhirschey
Copy link
Collaborator

@aski-codes what browser are you using?

It renders with proper spacing on Edge and mobile safari.

@nojaf
Copy link
Collaborator

nojaf commented Oct 10, 2023

Worked for me in Chrome.

@aski-codes
Copy link
Author

Hmm, it looks cleaner in your browser, somehow. I'm on Firefox 117.01

@nojaf
Copy link
Collaborator

nojaf commented Oct 10, 2023

It does show slightly off in Firefox for me as well:
image

Although copy-pasting it from there still worked for me.

@aski-codes
Copy link
Author

If I do a straight copy, I get:

"(4,2): error FS0010: Unexpected identifier in binding. Expected incomplete structured construct at or before this point or other token."

It looks exactly like the web page, but I noticed a blank starting line 4. If I remove it, so that "input" in line 4 aligns with "let" in line 1, I instead get:

"(1,15): error FS3217: This expression is not a function and cannot be applied. Did you intend to access the indexer via 'expr[index]'?"

billede

@nhirschey
Copy link
Collaborator

When I do straight copy+paste from firefox it works correctly. I am on windows 11 and it works. What platform are you on @aski-codes?

I tried pasting directly into dotnet fsi from terminal and vs code, both were correctly aligned.

@aski-codes
Copy link
Author

I'm on Mac 12.4

@nhirschey
Copy link
Collaborator

Note: Google search shows various rendering problems for google fonts (we use roboto mono) on firefox, and particularly macOS.

Seems to be related to fontweight. When I uncheck "font-weight: 600" in the css in the firefox inspector, the spacing is correct.

fonts

@aski-codes
Copy link
Author

Thanks, how do you get to that place in inspector, I can't seem to match it...

billede

Seems to be related to fontweight. When I uncheck "font-weight: 600" in the css in the firefox inspector, the spacing is correct.

@aski-codes
Copy link
Author

looks fine now, thanks so much!

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.

3 participants