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

Inconsistent formatting depending on file's line ending #24

Open
henriquegemignani opened this issue Aug 24, 2018 · 3 comments
Open

Inconsistent formatting depending on file's line ending #24

henriquegemignani opened this issue Aug 24, 2018 · 3 comments
Labels

Comments

@henriquegemignani
Copy link

henriquegemignani commented Aug 24, 2018

If the file uses CRLF as line endings, the lua-fmt gives this formatting:

pluralization[f4] =
    words(
    [[
  az bm bo dz fa hu id ig ii ja jv ka kde kea km kn
  ko lo ms my root sah ses sg th to tr vi wo yo zh
]]
)

When the file uses LF, the output is as follows:

pluralization[f4] =
    words([[
  az bm bo dz fa hu id ig ii ja jv ka kde kea km kn
  ko lo ms my root sah ses sg th to tr vi wo yo zh
]])

Obs: renaming words to wordsss, the output is then consistent no matter the line endings:

pluralization[f4] =
    wordsss(
    [[
  az bm bo dz fa hu id ig ii ja jv ka kde kea km kn
  ko lo ms my root sah ses sg th to tr vi wo yo zh
]]
)

Running lua-fmt via vscode-lua 0.12.4

@qaisjp
Copy link

qaisjp commented Aug 24, 2018

CLLF? Do you mean CRLF?

@qaisjp
Copy link

qaisjp commented Aug 24, 2018

First hunch is line length checking... at first glance it doesn't seem easy to fix without a performance impact (or breaking files with mixed line endings)

@henriquegemignani
Copy link
Author

Yeah, CRLF sorry.

@trixnz trixnz added the bug label Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants