Returns a new `SourceCursor` with the `should_compact` flag set. With the `should_compact` flag set, the cursor will format with optimised displays of: - Numbers: Remove leading zeros (`0.8` -> `.8`), trailing zeros (`1.0` -> `1`), redundant `+` sign - Idents/Functions/AtKeywords: Write UTF-8 instead of escape codes - Dimensions: Same as numbers for the number part, and same as Idents for the uni
(&self)
| 138 | /// - Whitespace: Normalize to a single space |
| 139 | /// |
| 140 | pub fn compact(&self) -> SourceCursor<'a> { |
| 141 | Self { |
| 142 | cursor: self.cursor, |
| 143 | source: self.source, |
| 144 | should_compact: true, |
| 145 | #[cfg(feature = "egg")] |
| 146 | should_expand: false, |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | /// Returns a new `SourceCursor` with the `should_expand` flag set. |
| 151 | /// |