debug icon indicating copy to clipboard operation
debug copied to clipboard

Remove double colon in Hash keys (`:sym: "value"` → `sym: "value"`)

Open amomchilov opened this issue 2 years ago • 2 comments

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 avatar Jul 27 '23 20:07 amomchilov

Are VS Code's pictures reversed?

st0012 avatar Jul 27 '23 21:07 st0012

@st0012 Yes they were. Fixed! 😅

amomchilov avatar Jul 28 '23 10:07 amomchilov