Markdown Monster
Mismatch between MdM and Github
Gravatar is a globally recognized avatar based on your email address. Mismatch between MdM and Github
  Tore Bleken
  All
  Feb 16, 2023 @ 08:11am

Rick, I have created a readme.md in MdM, and copied it to Github. The problem is that what shows as a table in MdM, shows as compressed text on Github. The fix was relatively easy, add a space at the end of every line.

Is there any setting in MdM to make it behave like Github, or do I just have to remember to add the spaces?

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Rick Strahl
  Tore Bleken
  Feb 16, 2023 @ 01:03pm

Example? What kind of table (Pipe or Grid)?

There was a recent fix that removed trailing spaces from Grid Tables - I wonder if that broke it?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Rick Strahl
  Tore Bleken
  Feb 16, 2023 @ 01:09pm

FWIW, GitHub doesn't support Grid tables, only Pipe tables. So if you're using Grid Tables they won't work...

Just checked formatting and embedding of pipe tables and that works just fine...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Tore Bleken
  Rick Strahl
  Feb 16, 2023 @ 01:21pm

This is a small part of the table, just like it was before I added some extra ending spaces. If you copy it into a readme.md on Github, you will see that it doesn't show any table, only the plain text.

You type Result after pressing F8
ed (in Command Window) Group of files defined in line 1 of pandora.txt are opened
<blank> (in Command Window) Same as above
ed x (x=numeric,>0) Group of matching files in pandora.txt are opened
x (x=numeric) Same as above
Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Rick Strahl
  Tore Bleken
  Feb 16, 2023 @ 01:55pm

Please format message with code formatting. Markdown is a code format.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Tore Bleken
  Rick Strahl
  Feb 16, 2023 @ 02:03pm

OK, here you are:

You type|Result after pressing `F8`
--------|---------------------|---
ed (in Command Window)|Group of files defined in line 1 of *pandora.txt* are opened
\<blank\> (in Command Window)|Same as above
ed x (x=numeric,>0)|Group of matching files in *pandora.txt* are opened
x (x=numeric)|Same as above
Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Rick Strahl
  Tore Bleken
  Feb 16, 2023 @ 04:57pm

That doesn't even look like markdown.

This is what it should look like:

You can reformat the table with MM, but you need to add the leading and trailing | at least to the first line.

The problem is that what you have is not proper Pipe Table markdown. You need the leading pipes - that's why GH isn't rendering it I think. It probably shouldn't render in MM either but the parser we use apparently does.

You can use the table editor to create the base table, or to re-edit existing tables (right click, Edit Table or Format Table or paste the markdown into the table editor).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Tore Bleken
  Rick Strahl
  Feb 16, 2023 @ 09:52pm

I don't want to argue, the problem is that the literature you find on Internet clearly can't be "trusted".

Since I don't work much with MD, I have in front of me three printed different MD "cheat sheets". Two of them don't show the leading and trailing |, and the third one doesn't mention tables at all.

Just to "excuse myself", here are links to two of these guides guides :
https://www.rstudio.com/wp-content/uploads/2015/02/rmarkdown-cheatsheet.pdf https://enterprise.github.com/downloads/en/markdown-cheatsheet.pdf

Anyway, I found the "official" Github MD documents at https://github.github.com/gfm/, I will study it. Or do you have the link to a better document?

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Rick Strahl
  Tore Bleken
  Feb 17, 2023 @ 12:12pm

The closest thing to official markdown standard is Daring Fireball's original spec here:

Markdown

The one most relevant docs in your case though is the GitHub Markdown docs:

GitHub Writing Docs (Tables)

Pipe tables are named that way because of the pipe separators which includes the leading pipes. But I suppose that it's legal to skip those since the renderer in MM (MarkDig which uses Github Flavored CommonMark) works with it.

If you don't know how something works take advantage of the tools in Markdown Monster. The Table Editor lets you create and edit tables, as well as reformat (although for reformat it requires the full pipe syntax at least on the line you're reformatting from).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Rick Strahl
  Tore Bleken
  Feb 17, 2023 @ 12:26pm

Just to clarify, here's what you can do to get your table to format properly:

Convert badly formatted Markdown Table

Once you have a properly formatted table you can edit the table or format it:

Format

Convert badly formatted Markdown Table

Edit

Convert badly formatted Markdown Table

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Mismatch between MdM and Github
  Tore Bleken
  Rick Strahl
  Feb 17, 2023 @ 01:01pm

Nice, I'll keep that in mind.

© 1996-2024