mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
T.P.Readers.Docx.Lists: replace a generic traversal...
using `bottomUp` with a faster one using `walk`.
This commit is contained in:
@@ -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)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user