Add tests for zero-width and fullwidth chars in grid tables

This commit is contained in:
Albert Krewinkel 2022-07-30 11:27:14 +02:00
parent f637ccd3bf
commit de5620b04d
No known key found for this signature in database
GPG key ID: 388DC0B21F631124
2 changed files with 162 additions and 0 deletions

View file

@ -1089,6 +1089,148 @@ Pandoc
]
]
(TableFoot ( "" , [] , [] ) [])
, Para
[ Str "East"
, Space
, Str "Asian"
, Space
, Str "characters"
, Space
, Str "have"
, Space
, Str "double"
, Space
, Str "width"
]
, Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault , ColWidth 4.1666666666666664e-2 )
, ( AlignDefault , ColWidth 6.944444444444445e-2 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\39770" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "fish" ] ]
]
]
]
(TableFoot ( "" , [] , [] ) [])
, Para
[ Str "Zero-width"
, Space
, Str "space"
, Space
, Str "in"
, Space
, Str "German"
]
, Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault , ColWidth 0.1111111111111111 )
, ( AlignDefault , ColWidth 0.1111111111111111 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "German" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "English" ] ]
]
, Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Auf\8204lage" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "edition" ] ]
]
]
]
(TableFoot ( "" , [] , [] ) [])
, Para
[ Str "Zero-width"
, Space
, Str "non-joiner"
, Space
, Str "in"
, Space
, Str "Persian"
]
, Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault , ColWidth 0.1111111111111111 )
, ( AlignDefault , ColWidth 0.1388888888888889 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain
[ Str "\1605\1740\8204\1582\1608\1575\1607\1605" ]
]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain
[ Str "I"
, Space
, Str "want"
, Space
, Str "to"
]
]
]
]
]
(TableFoot ( "" , [] , [] ) [])
, Para [ Str "Empty" , Space , Str "cells" ]
, Table
( "" , [] , [] )

View file

@ -260,6 +260,26 @@ Multiple blocks in a cell
| r1 bis | - b 2 | c 2 |
+------------------+-----------+------------+
East Asian characters have double width
+--+----+
|魚|fish|
+--+----+
Zero-width space in German
+-------+-------+
|German |English|
+-------+-------+
|Auflage|edition|
+-------+-------+
Zero-width non-joiner in Persian
+-------+---------+
|می‌خواهم|I want to|
+-------+---------+
Empty cells
+---+---+