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

Remove double colon in Hash keys (:sym: "value"sym: "value") #1003

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

amomchilov
Copy link

@amomchilov amomchilov commented Jul 27, 2023

This PR depends on the changes in #1001. Only this last commit of this PR is unique to this change.

Description

  • Both Chrome and VSCode automatically insert a : after the key, so the final result looks closer Ruby's Hash syntax, like: { sym: 1 }
  • This is consistent with how both Chrome and VSCode render the keys of JavaScript objects

Here's an example for this hash:

h = {
  sym1: 1,
  sym2: 2,
  "str" => 3,
}
Before After
Chrome chrome before chrome after
VSCode vscode before vscode after

@amomchilov amomchilov changed the title Double colon in Hash keys (:sym:sym:) Double colon in Hash keys (:sym: "value"sym: "value") Jul 27, 2023
@amomchilov amomchilov changed the title Double colon in Hash keys (:sym: "value"sym: "value") Remove double colon in Hash keys (:sym: "value"sym: "value") Jul 27, 2023
@st0012
Copy link
Member

st0012 commented Jul 27, 2023

Are VS Code's pictures reversed?

@amomchilov
Copy link
Author

amomchilov commented Jul 28, 2023

@st0012 Yes they were. Fixed! 😅

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

Successfully merging this pull request may close these issues.

3 participants