Skip to content

Commit

Permalink
add borders in table cell
Browse files Browse the repository at this point in the history
  • Loading branch information
Meow-z authored and ksprod committed Jan 10, 2018
1 parent f6abf15 commit 2d9f2ae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Text/Pandoc/Writers/Docx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,10 @@ blockToOpenXML' opts (Table caption aligns widths headers rows) = do
rows' <- mapM (mapM cellToOpenXML . zip aligns) rows
let borderProps = mknode "w:tcPr" []
[ mknode "w:tcBorders" []
$ mknode "w:bottom" [("w:val","single")] ()
$ mknode "w:start" [("w:val","single"), ("w:sz", "4"), ("w:color", "#B8CBE4")] ()
, mknode "w:end" [("w:val","single"), ("w:sz", "4"), ("w:color", "#B8CBE4")] ()
, mknode "w:top" [("w:val","single"), ("w:sz", "4"), ("w:color", "#B8CBE4")] ()
, mknode "w:bottom" [("w:val","single"), ("w:sz", "4"), ("w:color", "#B8CBE4")] ()
, mknode "w:vAlign" [("w:val","bottom")] () ]
let emptyCell = [mknode "w:p" [] [mknode "w:pPr" [] [pCustomStyle "Compact"]]]
let mkcell border contents = mknode "w:tc" []
Expand Down Expand Up @@ -987,7 +990,7 @@ blockToOpenXML' opts (Table caption aligns widths headers rows) = do
then []
else map mkgridcol widths)
: [ mkrow True headers' | hasHeader ] ++
map (mkrow False) rows'
map (mkrow True) rows'
)]
blockToOpenXML' opts (BulletList lst) = do
let marker = BulletMarker
Expand Down

0 comments on commit 2d9f2ae

Please sign in to comment.