oni icon indicating copy to clipboard operation
oni copied to clipboard

Couldn't Render Table Correct With Markdown

Open leion8310 opened this issue 6 years ago • 5 comments

Oni Version: 0.3.7 Neovim Version (Linux only): v0.3.1 Operating System: macOS

Issue: Couldn't Render Table Correct With Markdown

Expected behavior: Render Table By Raw

Actual behavior: Show The Raw

Steps to reproduce: Open Markdown Preview

wx20181003-101114 2x

leion8310 avatar Oct 03 '18 02:10 leion8310

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot[bot] avatar Oct 03 '18 02:10 oni-bot[bot]

Hey!

As you've already realised, this is due to the insertion of the scrolling anchors, which are used to keep the markdown preview inline with the markdown code buffer.

I'm not sure what the best way to do this is...Currently those anchors are added before the markdown is converted, but perhaps we should add them after? Or remove it entirely, since it causes some other issues potentially, around code blocks at least where the anchors are sometimes visible.

With the anchor code removed, the table is generated correctly, though does need some additional styling applied to make it look how a user would expect it.

Any input @TalAmuyal ?

CrossR avatar Oct 03 '18 11:10 CrossR

There is some logic that prevents the insertion of the anchors in inappropriate places (such as described above). I think that we should teach it to recognize tables as well.

On Wed, Oct 3, 2018, 14:17 Ryan C [email protected] wrote:

Hey!

As you've already realised, this is due to the insertion of the scrolling anchors, which are used to keep the markdown preview inline with the markdown code buffer.

I'm not sure what the best way to do this is...Currently those anchors are added before the markdown is converted, but perhaps we should add them after? Or remove it entirely, since it causes some other issues potentially, around code blocks at least where the anchors are sometimes visible.

With the anchor code removed, the table is generated correctly, though does need some additional styling applied to make it look how a user would expect it.

Any input @TalAmuyal https://github.com/TalAmuyal ?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/onivim/oni/issues/2604#issuecomment-426599730, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3IjRxCj_Sjnts4Iy_Y4g34eR77EBIAks5uhJzVgaJpZM4XFLSF .

TalAmuyal avatar Oct 03 '18 15:10 TalAmuyal

Consider deleting the anchor because it is actually not as useful in preview mode. @CrossR @TalAmuyal

leion8310 avatar Oct 04 '18 00:10 leion8310

I have replicated this same issue on CentOS7, Oni v0.3.6, Neovim v0.3.0. Thank you for opening this issue @leion8310

dbanks12 avatar Mar 12 '19 13:03 dbanks12