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

Space insertion when converting dashes #770

Closed
riccardopinosio opened this issue Apr 30, 2019 · 1 comment
Closed

Space insertion when converting dashes #770

riccardopinosio opened this issue Apr 30, 2019 · 1 comment

Comments

@riccardopinosio
Copy link

When I do:

rlang::quo(first-second)

The output is:

<quosure>
expr: ^first - second
env:  global

Which inserts spaces around the dash. Is this expected behaviour? I would expect
it would return:

<quosure>
expr: ^first-second
env:  global

With no spaces.

@lionel-
Copy link
Member

lionel- commented Apr 30, 2019

The spaces just don't exist in quoted calls. Here is a diagram of how calls are stored:

lobstr::ast(first - second)
█─`-` 
├─first 
└─second 

@lionel- lionel- closed this as completed Apr 30, 2019
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

No branches or pull requests

2 participants