handle figure ids better
This commit is contained in:
parent
ed54ec4c5a
commit
c4a430facb
1 changed files with 4 additions and 2 deletions
|
@ -36,8 +36,10 @@ pluck1 (x:xs) ys = (x,) <$> pluck x ys <|> pluck1 xs ys
|
|||
|
||||
|
||||
fixFigureClass :: Block -> Block
|
||||
fixFigureClass (Figure (_, c1, a1) cap [Plain [Image (i, c2, a2) alt path]]) =
|
||||
Figure (i, c1 ++ c2, a1 ++ a2) cap [Plain [Image ("", [], []) alt path]]
|
||||
fixFigureClass (Figure (i1, c1, a1) cap [Plain [Image (i2, c2, a2) alt path]]) =
|
||||
Figure (iF, c1 ++ c2, a1 ++ a2) cap [Plain [Image (iI, [], []) alt path]]
|
||||
where iF = if Text.null i1 then i2 else i1
|
||||
iI = if Text.null i1 then "" else i2
|
||||
fixFigureClass b = b
|
||||
|
||||
makeBlocks :: Block -> [Block]
|
||||
|
|
Loading…
Add table
Reference in a new issue