diff options
| author | TuongNM <[email protected]> | 2025-09-12 11:44:34 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-12 11:44:34 +0200 |
| commit | 5eb25ab4481eb6ab3b4aafff9ce1fd4086e58b52 (patch) | |
| tree | dcd51eeb5048cc9b34dbc346856c2ab7cd7f2675 /src | |
| parent | c93acab035e9f7f3576199ce1bf4009cc4530dcf (diff) | |
Markdown reader: Fix simple table alignment (#11136)
Take wide characters into account when determining the alignment.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 0605281db..f6c05cf33 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1243,7 +1243,7 @@ alignType strLst len = let nonempties = filter (not . T.null) $ map trimr strLst (leftSpace, rightSpace) = case sortOn T.length nonempties of - (x:_) -> (T.head x `elem` [' ', '\t'], T.length x < len) + (x:_) -> (T.head x `elem` [' ', '\t'], realLength x < len) [] -> (False, False) in case (leftSpace, rightSpace) of (True, False) -> AlignRight |
