mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-30 17:59:17 +08:00
RST writer: don't emit alignment markers in grid tables.
Closes #10857.
This commit is contained in:
@@ -339,7 +339,8 @@ blockToRST (Table _attrs blkCapt specs thead tbody tfoot) = do
|
||||
modify $ \st -> st{ stOptions = oldOpts }
|
||||
return result
|
||||
opts <- gets stOptions
|
||||
let renderGrid = gridTable opts blocksToDoc specs thead tbody tfoot
|
||||
let specs' = map (\(_,width) -> (AlignDefault, width)) specs
|
||||
renderGrid = gridTable opts blocksToDoc specs' thead tbody tfoot
|
||||
isSimple = all (== 0) widths && length widths > 1
|
||||
renderSimple = do
|
||||
tbl' <- simpleTable opts blocksToDoc headers rows
|
||||
|
||||
@@ -462,10 +462,10 @@
|
||||
, Str "lines."
|
||||
]
|
||||
])
|
||||
[ ( AlignCenter , ColWidth 0.15 )
|
||||
, ( AlignLeft , ColWidth 0.1375 )
|
||||
, ( AlignRight , ColWidth 0.1625 )
|
||||
, ( AlignLeft , ColWidth 0.35 )
|
||||
[ ( AlignDefault , ColWidth 0.15 )
|
||||
, ( AlignDefault , ColWidth 0.1375 )
|
||||
, ( AlignDefault , ColWidth 0.1625 )
|
||||
, ( AlignDefault , ColWidth 0.35 )
|
||||
]
|
||||
(TableHead
|
||||
( "" , [] , [] )
|
||||
@@ -606,10 +606,10 @@
|
||||
, Table
|
||||
( "" , [] , [] )
|
||||
(Caption Nothing [])
|
||||
[ ( AlignCenter , ColWidth 0.15 )
|
||||
, ( AlignLeft , ColWidth 0.1375 )
|
||||
, ( AlignRight , ColWidth 0.1625 )
|
||||
, ( AlignLeft , ColWidth 0.35 )
|
||||
[ ( AlignDefault , ColWidth 0.15 )
|
||||
, ( AlignDefault , ColWidth 0.1375 )
|
||||
, ( AlignDefault , ColWidth 0.1625 )
|
||||
, ( AlignDefault , ColWidth 0.35 )
|
||||
]
|
||||
(TableHead
|
||||
( "" , [] , [] )
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ Multiline table with caption:
|
||||
+-----------+----------+------------+---------------------------+
|
||||
| Centered | Left | Right | Default aligned |
|
||||
| Header | Aligned | Aligned | |
|
||||
+:=========:+:=========+===========:+:==========================+
|
||||
+===========+==========+============+===========================+
|
||||
| First | row | 12.0 | Example of a row that |
|
||||
| | | | spans multiple lines. |
|
||||
+-----------+----------+------------+---------------------------+
|
||||
@@ -53,7 +53,7 @@ Multiline table without caption:
|
||||
+-----------+----------+------------+---------------------------+
|
||||
| Centered | Left | Right | Default aligned |
|
||||
| Header | Aligned | Aligned | |
|
||||
+:=========:+:=========+===========:+:==========================+
|
||||
+===========+==========+============+===========================+
|
||||
| First | row | 12.0 | Example of a row that |
|
||||
| | | | spans multiple lines. |
|
||||
+-----------+----------+------------+---------------------------+
|
||||
|
||||
Reference in New Issue
Block a user