Comparing changes

v0.3.0 v0.3.1
2 commits 3 files changed

Commits

a340dfa chore: bump version mo khan 2026-01-09 23:32:29
26ef261 fix: correct the indentation mo khan 2026-01-09 23:31:54
src/formatter.rs
@@ -114,11 +114,13 @@ fn format_set_expr(set_expr: &SetExpr, indent_level: usize) -> String {
         SetExpr::Select(select) => format_select(select, indent_level),
         SetExpr::Query(query) => {
             let mut result = String::new();
+            result.push_str(&" ".repeat(indent_level));
             result.push('(');
             result.push('\n');
             result.push_str(&format_query(query, indent_level + 2));
             result.push('\n');
-            result.push_str(&format!("{})", " ".repeat(indent_level)));
+            result.push_str(&" ".repeat(indent_level));
+            result.push(')');
             result
         }
         SetExpr::SetOperation {
Cargo.lock
@@ -403,7 +403,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
 
 [[package]]
 name = "xlg-sqlfmt"
-version = "0.3.0"
+version = "0.3.1"
 dependencies = [
  "anyhow",
  "assert_cmd",
Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "xlg-sqlfmt"
-version = "0.3.0"
+version = "0.3.1"
 edition = "2024"
 description = "A command-line SQL formatter that reads SQL from stdin and writes formatted SQL to stdout"
 license = "MIT"