From 993ff05dc40abc69c4dbbd1fd3d9890460430323 Mon Sep 17 00:00:00 2001 From: Jaro Date: Thu, 6 Apr 2023 21:55:36 +0200 Subject: [PATCH] Fix style: bullet points in comments. --- .../Internal/LinePagination.hs | 4 +-- .../ParagraphLayout/Internal/Paginable.hs | 8 ++--- .../Internal/LinePaginationSpec.hs | 32 +++++++++---------- .../Text/ParagraphLayout/ParagraphData.hs | 10 +++--- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/Data/Text/ParagraphLayout/Internal/LinePagination.hs b/src/Data/Text/ParagraphLayout/Internal/LinePagination.hs index d4fd3ce..3b05cb2 100644 --- a/src/Data/Text/ParagraphLayout/Internal/LinePagination.hs +++ b/src/Data/Text/ParagraphLayout/Internal/LinePagination.hs @@ -7,8 +7,8 @@ -- -- Assumptions: -- --- * Lines are laid out from top to bottom. --- * Each page has the same size. +-- - Lines are laid out from top to bottom. +-- - Each page has the same size. -- (Preceding context may limit the space available on the given page, but it -- is assumed that the space on every following page can be used in full.) module Data.Text.ParagraphLayout.Internal.LinePagination diff --git a/src/Data/Text/ParagraphLayout/Internal/Paginable.hs b/src/Data/Text/ParagraphLayout/Internal/Paginable.hs index 9da52fc..8f00a4a 100644 --- a/src/Data/Text/ParagraphLayout/Internal/Paginable.hs +++ b/src/Data/Text/ParagraphLayout/Internal/Paginable.hs @@ -41,19 +41,19 @@ class Paginable pl where -- -- Explanation of return values: -- - -- * @(`Continue`, p, `Nothing`)@ + -- - @(`Continue`, p, `Nothing`)@ -- means that @p@ is the entire layout and fits best on the current page. -- - -- * @(`Break`, p, `Nothing`)@ + -- - @(`Break`, p, `Nothing`)@ -- means that @p@ is the entire layout and fits best on a new page. -- In other words, @p@ should be preceded by a page break. -- - -- * @(`Continue`, p, `Just` rest)@ + -- - @(`Continue`, p, `Just` rest)@ -- means that @p@ is a part of the layout that fits best on the current -- page, and @rest@ should be passed to this function again. -- In other words, @p@ should be followed by a page break. -- - -- * @(`Break`, p, `Just` rest)@ + -- - @(`Break`, p, `Just` rest)@ -- means that @p@ is a part of the layout that fits best on a new page, -- and @rest@ should be passed to this function again. -- In other words, @p@ should be surrounded by page breaks diff --git a/test/Data/Text/ParagraphLayout/Internal/LinePaginationSpec.hs b/test/Data/Text/ParagraphLayout/Internal/LinePaginationSpec.hs index 692927d..a07a209 100644 --- a/test/Data/Text/ParagraphLayout/Internal/LinePaginationSpec.hs +++ b/test/Data/Text/ParagraphLayout/Internal/LinePaginationSpec.hs @@ -52,12 +52,12 @@ spec = do let ls = tenLines let page = bestSplit 3 4 -- Acceptable page breaks: - -- * 0 + 10 - -- * 3 + 7 - -- * 4 + 6 - -- * 5 + 5 - -- * 6 + 4 - -- * 10 + 0 + -- - 0 + 10 + -- - 3 + 7 + -- - 4 + 6 + -- - 5 + 5 + -- - 6 + 4 + -- - 10 + 0 ([0, 10, 15, 25] :: [Int32]) `forM_` \h -> it ("maxHeight = " ++ show h ++ " ensures 3 orphans") $ @@ -88,9 +88,9 @@ spec = do let ls = tenLines let page = bestSplit 6 4 -- Acceptable page breaks: - -- * 0 + 10 - -- * 6 + 4 - -- * 10 + 0 + -- - 0 + 10 + -- - 6 + 4 + -- - 10 + 0 ([0, 10, 15, 35, 50, 55] :: [Int32]) `forM_` \h -> it ("maxHeight = " ++ show h ++ " ensures 6 orphans") $ @@ -111,8 +111,8 @@ spec = do let ls = tenLines let page = bestSplit 6 5 -- Acceptable page breaks: - -- * 0 + 10 - -- * 10 + 0 + -- - 0 + 10 + -- - 10 + 0 ([0, 10, 60, 65, 85, 95] :: [Int32]) `forM_` \h -> it ("maxHeight = " ++ show h ++ " puts all in second list") $ @@ -193,11 +193,11 @@ spec = do let ls = tenLines let page = paginateLines 5 3 -- Acceptable page breaks: - -- * 0 + 10 - -- * 5 + 5 - -- * 6 + 4 - -- * 7 + 3 - -- * 10 + 0 + -- - 0 + 10 + -- - 5 + 5 + -- - 6 + 4 + -- - 7 + 3 + -- - 10 + 0 it "puts all lines on current page if possible" $ page 200 200 ls `shouldBe` diff --git a/test/Data/Text/ParagraphLayout/ParagraphData.hs b/test/Data/Text/ParagraphLayout/ParagraphData.hs index 07b3cd9..d4243e7 100644 --- a/test/Data/Text/ParagraphLayout/ParagraphData.hs +++ b/test/Data/Text/ParagraphLayout/ParagraphData.hs @@ -100,11 +100,11 @@ devanagariPrefixedAccentParagraph = "#" |< zxx "\x954" >| "" -- | Test hard line breaks with Latin characters: -- --- * after a short line (no soft line breaks needed), --- * after a longer line (soft line breaks needed), --- * after a long word (line break in the middle of a word needed), --- * after spaces, --- * after other line breaks. +-- - after a short line (no soft line breaks needed), +-- - after a longer line (soft line breaks needed), +-- - after a long word (line break in the middle of a word needed), +-- - after spaces, +-- - after other line breaks. hardBreaksLTRParagraph :: ParagraphOptions -> Paragraph hardBreaksLTRParagraph = "x" |< zxx "jjjjjj\njjjjjj jjjjjj jjjjjj\nmmmmmm \njjjjjj\n\nmm mm mm" >| "" -- 2.30.2