-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Evaluating a non-list top level form from inside a form evaluates the wrong form when in a rich comment #2290
Comments
I updated the title to reflect that this seems to be specific to when the top level form evaluated is not a function call. This is correctly handled: (comment
(str "w|orld") => "world"
:rcf) |
I updated the title again, because it is not only from inside strings it goes wrong. It's from inside a form that's is inside a “non-list”, when in a rich comment: (comment
{:hello "w|orld"} => "world"
{:hello ['w|orld]} => [world]
:rcf) I added some unit tests that expose this: |
Assuming you ran the command to evaluate the top level form in that code you showed, from where you showed the cursor to be, that example doesn't show for sure that the evaluation is correctly handled. Evaluating both Anyway, good investigation and nice work on the fix. |
Repro:
With the cursor at
|
within the form above, run the command the evaluate the top level form, and see that"world"
is returned. I expect{:hello "world"}
to be returned.If you move that map outside the comment form and perform the same steps, the whole map is returned instead of just the string, as is expected.
The text was updated successfully, but these errors were encountered: