Skip to content

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! 😅

@amomchilov amomchilov force-pushed the plain-symbol-keys branch 2 times, most recently from 46c0421 to 7e3c8f1 Compare January 4, 2024 04:48
@ko1 ko1 added this to the v10.1 milestone Dec 18, 2024
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 this pull request may close these issues.

4 participants