diff --git a/.gitattributes b/.gitattributes index ca985ca..cf332f3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/packages/cli/src/gen/definitions/parser.rs b/packages/cli/src/gen/definitions/parser.rs index 1c09882..0b47cc5 100644 --- a/packages/cli/src/gen/definitions/parser.rs +++ b/packages/cli/src/gen/definitions/parser.rs @@ -49,7 +49,7 @@ impl DefinitionsParser { S: AsRef, { // 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];