diff options
author | Frank Seifferth <frankseifferth@posteo.net> | 2021-05-11 22:39:52 +0200 |
---|---|---|
committer | Frank Seifferth <frankseifferth@posteo.net> | 2021-05-11 22:39:52 +0200 |
commit | 57703f7723691c21cc1e27bb3c4e5b51bc613332 (patch) | |
tree | 6ec4aa4421c05b825c8a77a0727fd582ae02c310 | |
parent | 33425ed72d72edbc52036601a430e2d7af96bb03 (diff) | |
download | vis-editorconfig-57703f7723691c21cc1e27bb3c4e5b51bc613332.tar.gz |
Simplify handling of insert_final_newline
-rw-r--r-- | edconf.lua | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -124,13 +124,8 @@ OPTIONS = { -- Quote: insert_final_newline Set to true ensure file ends with a -- newline when saving and false to ensure it doesn’t. -- - if value == "true" then - set_pre_save(insert_final_newline, "true") - set_pre_save(strip_final_newline, "false") - elseif value == "false" then - set_pre_save(strip_final_newline, "true") - set_pre_save(insert_final_newline, "false") - end + set_pre_save(insert_final_newline, tostring(value == "true")) + set_pre_save(strip_final_newline, tostring(value == "false")) end, trim_trailing_whitespace = function (value) |