From 3e3303abbf7f72e14c48d2da7947dfdee52c38f3 Mon Sep 17 00:00:00 2001 From: TroyHernandez Date: Wed, 4 Mar 2026 13:17:03 -0600 Subject: [PATCH 1/2] Fix implicit double-to-int conversion warning --- src/ifelse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifelse.cpp b/src/ifelse.cpp index 76c417d..2851e73 100644 --- a/src/ifelse.cpp +++ b/src/ifelse.cpp @@ -252,7 +252,7 @@ void expand_call_if_args(std::vector& tokens, const FormatOptions& opts) tokens[else_idx].out_order - 0.5)); tokens.push_back(make_token("'{'", "{", base_line + 2, tokens[else_idx].out_order + 0.5)); - int false_first_order = (false_start < n) ? + double false_first_order = (false_start < n) ? tokens[false_start].out_order - 0.5 : 0.5; tokens.push_back(make_token("'}'", "}", base_line + 4, false_first_order)); From a645cce15c095342b611e4768bd29fa51b44897b Mon Sep 17 00:00:00 2001 From: TroyHernandez Date: Wed, 4 Mar 2026 13:27:27 -0600 Subject: [PATCH 2/2] Regenerate join_else_transform docs to fix codoc mismatch --- man/join_else_transform.Rd | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/man/join_else_transform.Rd b/man/join_else_transform.Rd index f3559cf..a87d856 100644 --- a/man/join_else_transform.Rd +++ b/man/join_else_transform.Rd @@ -3,17 +3,22 @@ \alias{join_else_transform} \title{Join Else to Preceding Close Brace} \usage{ -join_else_transform(terms) +join_else_transform(terms, indent_str, line_limit) } \arguments{ \item{terms}{Enriched terminal DataFrame.} + +\item{indent_str}{Indent string for line width calculation.} + +\item{line_limit}{Maximum line width.} } \value{ Updated DataFrame. } \description{ -AST transform that moves ELSE tokens (and any following opening brace) -to the same output line as the preceding `\}`. Skips if a COMMENT -exists between `\}` and `else`. +AST transform that moves ELSE tokens (and any following tokens on the +same line, like `if` in `else if`) to the same output line as the +preceding `\}`. Skips if a COMMENT exists between `\}` and `else`, +or if joining would exceed the line limit. } \keyword{internal}