Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Make markdown table syntax more compatible

chris4beta's profile image chris4beta posted 3 years ago in General Permalink

Most markdown parsers require at least one dash in the header separator, so

| id | name | email | bal | 
| -: | - | - | -: | 
| 5 | chris | foo | 12089 |

would be valid. I found that Gitlab's parser does not like this, and requires 3.

Making the separator 3 dashes long does not affect rendering anywhere else that I've seen, as the "at least one dash" requirement is met.

| id | name | email | bal | 
| ---: | --- | --- | ---: | 
| 5 | chris | foo | 12089 |

Your parser renders it correctly too:

id name email bal
5 chris foo 12089

Can the markdown output be updated to use 3 dashes instead of 1?

chris4beta's profile image chris4beta posted 3 years ago Permalink

Sorry, this should be in Feature Discussion but I can't seem to edit after the fact.

ansgar's profile image ansgar posted 3 years ago Permalink

Yes, I can do that. It's always the question if that's not breaking other things, which you already checked.

Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
Code modification/commit d75ae73 from ansgarbecker, 3 years ago, revision 5143
Make Markdown export code compatible to the parser on gitlab.com, by using 3 dashes instead of 1, below header columns. See http://www.heidisql.com/forum.php?t=22991
ansgar's profile image ansgar posted 3 years ago Permalink

Done in r5143

Mifczu's profile image Mifczu posted 3 years ago Permalink

it's a great option. Can you do it so that the table looks good without formatting? In the above example:

| id   | name  | email |   bal | 
| ---: | ----- | ----- | ----: | 
|    5 | chris | foo   | 12089 |

This is useful when the text is pasted somewhere where has no formatting or columns is a lot.

ansgar's profile image ansgar posted 3 years ago Permalink

Hm, that requires some look-ahead into the data before creating any value, so Heidi knows the minimum width of each column, right? Should have some hardcoded max-width too I guess, so blob/text columns with megabytes of text don't get too wide, right?

Mifczu's profile image Mifczu posted 3 years ago Permalink

Yes, you have to iterate through all the data to check the size. But as we will use the mysql client from cli is a table in the asci are drawn in good widths.

As for the field blob/text then you need to shift responsibility fully for the user. Displays a large column of this table will be wide.

Please login to leave a reply, or register at first.