mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
fix formatting
This commit is contained in:
parent
394fc41819
commit
d445eb0bb0
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user