|
|
@ -576,9 +576,8 @@ impl Document {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Detect the indentation used in the file, or otherwise defaults to the language indentation
|
|
|
|
/// Detect the indentation used in the file, or otherwise defaults to the language indentation
|
|
|
|
/// configured in `languages.toml`, with a fallback to 4 space indentation if it isn't
|
|
|
|
/// configured in `languages.toml`, with a fallback to tabs if it isn't specified. Line ending
|
|
|
|
/// specified. Line ending is likewise auto-detected, and will fallback to the default OS
|
|
|
|
/// is likewise auto-detected, and will fallback to the default OS line ending.
|
|
|
|
/// line ending.
|
|
|
|
|
|
|
|
pub fn detect_indent_and_line_ending(&mut self) {
|
|
|
|
pub fn detect_indent_and_line_ending(&mut self) {
|
|
|
|
self.indent_style = auto_detect_indent_style(&self.text).unwrap_or_else(|| {
|
|
|
|
self.indent_style = auto_detect_indent_style(&self.text).unwrap_or_else(|| {
|
|
|
|
self.language_config()
|
|
|
|
self.language_config()
|
|
|
|