Skip to content

Indentation + trailing whitespace behaviour changed between versions 1.5.0 and 1.5.1 #247

Description

@paleolimbot

When upgrading to glue 1.5.1, we noticed a difference in the handling of indentation because we use glue in the arrow R package for code generation. It's a fairly easy workaround (see apache/arrow#11936) but I couldn't find anything in the merged PRs list or changelog that indicates that this was intentional. A few reprexes that I hope are helpful! It seems like the handling of trailing whitespace changed.

# remotes::install_github("tidyverse/glue")
glue::glue("\n  text\n  with\n  indentation\n  \n")
#>   text
#>   with
#>   indentation
#> 
glue::glue("\n  text\n  with\n  indentation")
#> text
#> with
#> indentation
# remotes::install_github("cran/glue@1.5.0")
glue::glue("\n  text\n  with\n  indentation\n  \n")
#> text
#> with
#> indentation
glue::glue("\n  text\n  with\n  indentation")
#> text
#> with
#> indentation

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions