mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Try to force definitions file to have LF endings
This commit is contained in:
parent
f6f9e9db1f
commit
2f3157b64d
2 changed files with 6 additions and 1 deletions
5
.gitattributes
vendored
5
.gitattributes
vendored
|
@ -1,4 +1,9 @@
|
|||
* text=auto
|
||||
|
||||
# Temporarily highlight luau as normal lua files
|
||||
# until we get native linguist support for Luau
|
||||
*.luau linguist-language=Lua
|
||||
|
||||
# Ensure all lua files use LF
|
||||
*.lua eol=lf
|
||||
*.luau eol=lf
|
||||
|
|
|
@ -49,7 +49,7 @@ impl DefinitionsParser {
|
|||
S: AsRef<str>,
|
||||
{
|
||||
// TODO: Properly handle the "declare class" syntax, for now we just skip it
|
||||
let mut no_class_declares = contents.as_ref().to_string();
|
||||
let mut no_class_declares = contents.as_ref().replace("\r\n", "\n");
|
||||
while let Some(dec) = no_class_declares.find("\ndeclare class") {
|
||||
let end = no_class_declares.find("\nend").unwrap();
|
||||
let before = &no_class_declares[0..dec];
|
||||
|
|
Loading…
Reference in a new issue