aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2022-07-30 11:27:14 +0200
committerAlbert Krewinkel <[email protected]>2022-07-30 11:27:14 +0200
commitde5620b04df540d11efdf96fb142b63b5ec4d3c5 (patch)
tree3bf4a1d8c178e84d25f7524533b42603e7ec1a39
parentf637ccd3bf9c955b8e92e6f759556bfcb8a33d83 (diff)
Add tests for zero-width and fullwidth chars in grid tables
-rw-r--r--test/markdown-reader-more.native142
-rw-r--r--test/markdown-reader-more.txt20
2 files changed, 162 insertions, 0 deletions
diff --git a/test/markdown-reader-more.native b/test/markdown-reader-more.native
index 7c15f627a..82b3577be 100644
--- a/test/markdown-reader-more.native
+++ b/test/markdown-reader-more.native
@@ -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
( "" , [] , [] )
diff --git a/test/markdown-reader-more.txt b/test/markdown-reader-more.txt
index 0480e41cc..c6f313b20 100644
--- a/test/markdown-reader-more.txt
+++ b/test/markdown-reader-more.txt
@@ -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|
++-------+-------+
+|Auf‌lage|edition|
++-------+-------+
+
+Zero-width non-joiner in Persian
+
++-------+---------+
+|می‌خواهم|I want to|
++-------+---------+
+
Empty cells
+---+---+