From d445eb0bb094f89c83adc6040a18681f9b98f3c2 Mon Sep 17 00:00:00 2001 From: Jake Kenneally Date: Sat, 31 Jan 2026 15:14:51 -0500 Subject: [PATCH] fix formatting --- lib/Epub/Epub/ParsedText.cpp | 6 ++---- lib/Epub/Epub/css/CssStyle.h | 18 +++++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/Epub/Epub/ParsedText.cpp b/lib/Epub/Epub/ParsedText.cpp index 8e38e63b..63648f04 100644 --- a/lib/Epub/Epub/ParsedText.cpp +++ b/lib/Epub/Epub/ParsedText.cpp @@ -23,8 +23,7 @@ constexpr size_t SOFT_HYPHEN_BYTES = 2; // (no space before it). Includes sentence punctuation and closing quotes. // Excludes brackets/parens to avoid false positives with decorative patterns like "[ 1 ]". bool isAttachingPunctuation(const char c) { - return c == '.' || c == ',' || c == '!' || c == '?' || c == ';' || c == ':' || - c == '"' || c == '\''; + return c == '.' || c == ',' || c == '!' || c == '?' || c == ';' || c == ':' || c == '"' || c == '\''; } // Check if a word consists entirely of punctuation that should attach to the previous word @@ -437,8 +436,7 @@ void ParsedText::extractLine(const size_t breakIndex, const int pageWidth, const // Add spacing after this word, unless the next word is attaching punctuation auto nextWordIt = wordIt; ++nextWordIt; - const bool nextIsAttachingPunctuation = - wordIdx + 1 < lineWordCount && isAttachingPunctuationWord(*nextWordIt); + const bool nextIsAttachingPunctuation = wordIdx + 1 < lineWordCount && isAttachingPunctuationWord(*nextWordIt); xpos += currentWordWidth + (nextIsAttachingPunctuation ? 0 : spacing); ++wordIt; diff --git a/lib/Epub/Epub/css/CssStyle.h b/lib/Epub/Epub/css/CssStyle.h index 4b3b063f..1bf0fba0 100644 --- a/lib/Epub/Epub/css/CssStyle.h +++ b/lib/Epub/Epub/css/CssStyle.h @@ -99,15 +99,15 @@ struct CssStyle { CssFontWeight fontWeight = CssFontWeight::Normal; CssTextDecoration decoration = CssTextDecoration::None; - CssLength indent; // First-line indent (deferred resolution) - CssLength marginTop; // Vertical spacing before block - CssLength marginBottom; // Vertical spacing after block - CssLength marginLeft; // Horizontal spacing left of block - CssLength marginRight; // Horizontal spacing right of block - CssLength paddingTop; // Padding before - CssLength paddingBottom; // Padding after - CssLength paddingLeft; // Padding left - CssLength paddingRight; // Padding right + CssLength indent; // First-line indent (deferred resolution) + CssLength marginTop; // Vertical spacing before block + CssLength marginBottom; // Vertical spacing after block + CssLength marginLeft; // Horizontal spacing left of block + CssLength marginRight; // Horizontal spacing right of block + CssLength paddingTop; // Padding before + CssLength paddingBottom; // Padding after + CssLength paddingLeft; // Padding left + CssLength paddingRight; // Padding right CssPropertyFlags defined; // Tracks which properties were explicitly set