jgm/pandoc — Issue #348: Markdown Parser Miscalculates Width of Cells Containing Multibyte Characters
Author: runpaint
Created: 2011-11-15 18:41:13+00:00
State: open

The Markdown table parser miscalculates the width of cells containing multibyte characters. For example, using 〃(U+3003) which is 3 bytes, consider the following table:

+--+----+
|a |b |
+==+====+
|〃|foo |
+--+----+
|" |foo |
+--+----+

This is converted to the following HTML by [Try Pandoc](http://johnmacfarlane.net/pandoc/try):

a
b

〃|f
oo

"
foo

To generate the correct HTML the cell containing 〃 needs to be an extra byte wide:

+--+----+
|a |b |
+==+====+
|〃 |foo|
+--+----+
|" |foo |
+--+----+

The workaround is to use HTML character entities, but it would be helpful if Unicode was supported. :-)

(This is similar to issue #108, but in this case no combining characters are involved).