question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: text-align is not working in markdown table with chinese

See original GitHub issue

Prettier 1.14.3 Playground link

--parser markdown

Input:

| 参数    | 说明                                                                                                                     | 类型                                |
| ------- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------- |
| `link`  | 是否在该字段上显示使用超链接( Cmd + 左键 跳转至 icafe ), 当命令行宽度大于 140 时,该功能才开启;小于时候有文本换行 bug | `boolean`                           |
| `w`     | 该字段的最大宽度大小,超出用 '...' 结尾,如 `30%` 或者 `100`                                                             | `number|string`                     |
| `align` | 该字段的水平对齐规则                                                                                                     | `'left'` OR `'right'` OR `'center'` |

Output:

| 参数    | 说明                                                                                                                     | 类型                                |
| ------- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------- |
| `link`  | 是否在该字段上显示使用超链接( Cmd + 左键 跳转至 icafe ), 当命令行宽度大于 140 时,该功能才开启;小于时候有文本换行 bug | `boolean`                           |
| `w`     | 该字段的最大宽度大小,超出用 '...' 结尾,如 `30%` 或者 `100`                                                             | `number|string`                     |
| `align` | 该字段的水平对齐规则                                                                                                     | `'left'` OR `'right'` OR `'center'` |

Expected behavior:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
imcuttlecommented, Oct 25, 2018

I got it, Thanks @ikatyang 👍

0reactions
ikatyangcommented, Oct 25, 2018

I meant, a monospaced font that supports both Latin and Chinese.

There’s no way to align them if they’re not monospaced.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown `native` text alignment - Stack Overflow
1. the align attribute has been deprecated since HTML 4 and obsolete since HTML 5. · 10. While the above answers did not...
Read more >
Working with Tables in GitHub Markdown - Pluralsight
A table in markdown consists of two parts. The header. The rows of data in the table · Individual columns in a table...
Read more >
5. reStructuredText Markup — Sphinx with Github Webpages ...
A sublist is a new list so requires a blank line above and below. - This is the third item of the main...
Read more >
tabulate · PyPI
Pretty-print tabular data in Python, a library and a command-line utility. The main use cases of the library are: printing small tables without...
Read more >
Changelog - Doxygen Manual
... issue #8864 Markdown Tables cannot merge cells both horizontally and vertically [view] ... Problem with generating test output for Chinese (#7862) [view] ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found