Skip to content

Commit

Permalink
T.P.Readers.Docx.Lists: replace a generic traversal...
Browse files Browse the repository at this point in the history
using `bottomUp` with a faster one using `walk`.
  • Loading branch information
jgm committed Jun 4, 2024
1 parent f5531f1 commit 75afa78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Text/Pandoc/Readers/Docx/Lists.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Data.List
import Data.Maybe
import Data.String (fromString)
import qualified Data.Text as T
import Text.Pandoc.Generic (bottomUp)
import Text.Pandoc.Walk (walk)
import Text.Pandoc.JSON
import Text.Pandoc.Readers.Docx.Parse (ParaStyleName)
import Text.Pandoc.Shared (trim, safeRead)
Expand Down Expand Up @@ -153,7 +153,7 @@ singleItemHeaderToHeader blk = blk
blocksToBullets :: [Block] -> [Block]
blocksToBullets blks =
map singleItemHeaderToHeader $
bottomUp removeListDivs $ flatToBullets (handleListParagraphs blks)
walk removeListDivs $ flatToBullets (handleListParagraphs blks)

plainParaInlines :: Block -> [Inline]
plainParaInlines (Plain ils) = ils
Expand Down

0 comments on commit 75afa78

Please sign in to comment.