idea-multimarkdown: Wrap on typing and Table format do not take actual character widths into account for multi-byte characters

copied from #219

Table formatting produces unexpected results when typing multibyte characters. Would you have any plans to fix it? In case it is difficult to handle multibyes, it would be nice if we could disable auto formatting feature for table.

Environment:

  • Ubuntu 14.04 LTS
  • IntelliJ IDEA 2016.1
  • Build #IU-145.970, built on April 18, 2016
  • JRE: 1.8.0_76-release-b47 amd64
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • Multimarkdown: 1.4.10 (Enhanced edition)

Expected result:

| マルチバイト |
|:-----------|
| Cell       |
| Alphabet   |
|:-----------|
| マルチバイト |

Actual result:

| マルチバイト |
|:-------|
| Cell   |
| Alphabet |
|:---------|
| マルチバイト   |

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 20 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@cuiguojie, pre-releas EAP version with proper wrapping and table alignment based on character widths is now available: https://github.com/vsch/idea-multimarkdown/raw/master/dist/idea-multimarkdown.1.6.3.92.zip

Table column width matching is done +/- 1/2 space width of the display font, cumulative for the line.

Please let me know if you encounter any issues.

Here is the result of wrapping and formatting tables for source given below:

screen shot 2016-05-25 at 11 44 01 am

Source:

| マルチバイト |
|:-----------|
| Cell       |

| Alphabet   |
|:-----------|
| マルチバイト |

マルチバイト マルチバイト マルチバイト マルチバイト tests マルチバイト マルチバイト マルチバイト マルチバイト
マルチバイト マルチバイト

| 字段名   | 说明                         | 是否必须 | 备注    |
|---------|-----------------------------|---------|--------|
| status  | 状态码                       | 是       | String |
| result  | 内容主体                      | 否       | Object |
| message | 异常情况的错误信息,供显示给用户 | 否       | String |

异常情况的错误信息, mixed chars width wrapping mode test 供显示给用户 异常情况的错误信息 供显示给用户
异常情况的错误信息,供显示给用户 异常情况的错误信息,供显示给用户 异常情况的错误信息,供显示给用户
异常情况的错误信息,供显示给用户