miyuchina / mistletoe

A fast, extensible and spec-compliant Markdown parser in pure Python.
MIT License
841 stars 119 forks source link

Update jira_renderer.py - Fix rendering of empty table cells #109

Closed Fanduzi closed 3 years ago

Fanduzi commented 3 years ago
|    Table    | Non_unique |  Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression |
|-------------|------------|-----------|--------------|-------------|-----------|-------------|----------|--------|------|------------|---------|---------------|---------|------------|
| page_config |     0      |  PRIMARY  |      1       |      id     |     A     |      27     |   None   |  None  |      |   BTREE    |         |               |   YES   |    None    |
| page_config |     0      | UNIQ_USER |      1       |   user_id   |     A     |      27     |   None   |  None  |      |   BTREE    |         |               |   YES   |    None    |

after jira_render, got

||Table||Non_unique||Key_name||Seq_in_index||Column_name||Collation||Cardinality||Sub_part||Packed||Null||Index_type||Comment||Index_comment||Visible||Expression||
|page_config|0|PRIMARY|1|id|A|27|None|None||BTREE|||YES|None|
|page_config|0|UNIQ_USER|1|user_id|A|27|None|None||BTREE|||YES|None|

image

pbodnar commented 3 years ago

You are right, thank you! Note that this strange Jira's requirement of having a space in between '|' for an empty cell is reported as a bug here: https://jira.atlassian.com/browse/JRASERVER-70048.

pbodnar commented 3 years ago

@Fanduzi, thanks for your 1st contribution. :) Tips for the next time:

a) write a good commit message (don't rely on GitHub web editor to prepare it for you) b) add a corresponding unit test whenever possible (I did this at 7e57376e60d7b84f5e01d19caff4ede52151530d.)

Fanduzi commented 3 years ago

@Fanduzi, thanks for your 1st contribution. :) Tips for the next time:

a) write a good commit message (don't rely on GitHub web editor to prepare it for you) b) add a corresponding unit test whenever possible (I did this at 7e57376.)

got it