nea / MarkdownViewerPlusPlus

A Notepad++ Plugin to view a Markdown file rendered on-the-fly
MIT License
1.17k stars 143 forks source link

Problem with table display #24

Closed fmigneault closed 6 years ago

fmigneault commented 7 years ago

The markdown display of tables doesn't seem to be recognized as expected.

Here is an example of the markdown and corresponding plugin output: markdown-problem

And here the resulting (expected) output viewed online (bitbucket). markdown-working

I'm using version 0.7 strait from the Notepad++ Plugin Manager.

nea commented 7 years ago

Hi @KenjiKyo

Thanks for your report. Unfortunately, your example pipe-table is not part of the original CommonMark specification (http://spec.commonmark.org/0.27/). The "normal" CommonMark only supports HTML Tables and no pipe-tables. Sorry.

I will have a look to extend the MarkdownViewer++ with either https://github.com/AMDL/CommonMark.NET/tree/pipe-tables or https://github.com/lunet-io/markdig to support this in one of the next versions.

Cheers

nea commented 7 years ago

Hi @KenjiKyo

I pushed a branch https://github.com/nea/MarkdownViewerPlusPlus/tree/0.7.5 with Markdig instead of CommonMark.Net. It supports pipe-tables (http://pandoc.org/MANUAL.html#extension-pipe_tables).

I haven't tested it thoroughly but you can check it out and build yourself one library.

I will dig deeper into everything when I have more time and make an official release if it works out.

Cheers

fmigneault commented 7 years ago

Sorry for taking so long to come back around for this issue. I will give a try to this branch if I can find some time on my side too. Thank you for trying to support it. I wasn't aware that it wasn't part of the standard specification.

fmigneault commented 7 years ago

Hi,

I've found some time to compile the source code and test it out. I can confirm that version 0.8.0 is working for Notepad++ 7.3.2 (32/64-bit) on Windows 10 x64.

It currently displays as in this image: image

Is it due to Markdig limitation that the table lines are not showing? In the meantime, this fix is great, but the table is not really "displayed" without the row/column separations. Is it possible to easily adapt the code to allow this?

Thank you

nea commented 7 years ago

Hi @KenjiKyo

As the generated source should feature normal table syntax, you could use the custom CSS option to add your own styling of the table, i.e. table lines.

I am sorry I don't get that, but what do you mean by "...the table is not really "displayed" without the row/column separations." Then I will have a look.

Cheers

fmigneault commented 7 years ago

Hi @nea

I was referring to the lines separators for rows and/or columns, but I believe this is related to the CSS option you mentioned just before. How could I edit this CSS styling to display within notepad++?

Thank you

nea commented 7 years ago

Hi @KenjiKyo

First thing I would check is to go to the Options https://github.com/nea/MarkdownViewerPlusPlus#options and add a simple 1px border like https://www.w3schools.com/css/css_table.asp.

If this doesn't work let me know. I don't have that much time atm but will get to it later on.

Cheers

fmigneault commented 7 years ago

Hi @nea

This did the trick. Thank you for your help.

svytas commented 7 years ago

When are you planning a release of this 0.8.0 version? Need this feature :)

nea commented 7 years ago

Hey @svytas

I am currently on a different work-release, which take up the rest of my month (and my previous weeks). I am sorry about that.

But it is "supposed" to be released by the end of August, when I will have time to cater to this next release again.

Sorry Savas

dhoepfl commented 6 years ago

I failed to build a working version using VS 2015 so … any change we see a release soon?

brcros commented 6 years ago

Hello, if there is still issues, may be you can provide the table rendering as an optional experimental feature. Actually, Swagger 3 editor have not a perfect implementation, but there is workaround ( unicode escape... )

thank you

Clicketyclick commented 6 years ago

Has this function any hope of a release?

avkhitry commented 6 years ago

Hi there, hope to find you well. Sooo want to have this feature implemented too ))

einaruk commented 6 years ago

Hello, the reason I installed your plugin was to be able to create tables with pipe notation. I see it is missing. Is there a plan to put this feature in next release? Thanks for the effort...

nea commented 6 years ago

Hi everyone

I just released a new version 0.8.0.

I changed the Markdown renderer to Markdig which supports pipe and grid tables

I hope this helps.

Cheers

fmigneault commented 6 years ago

Works like a charm for the tables!

Clicketyclick commented 6 years ago

Just great! Added this CSS in Options / HTML /Custom CSS to display borders:

table {
    border-collapse: collapse;
}
tr, td, th {
    border: 1px solid #AAA;
    padding: 4px;
}