Skip to content

bug: pipeline tables not rendered correctly #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
raffaem opened this issue Jul 24, 2024 · 5 comments
Closed

bug: pipeline tables not rendered correctly #91

raffaem opened this issue Jul 24, 2024 · 5 comments
Labels
not a bug Not a bug in this plugin

Comments

@raffaem
Copy link

raffaem commented Jul 24, 2024

Neovim version (nvim -v)

0.10

Operating system

Arch Linux

Terminal emulator / GUI

Kitty

Describe the bug

pandoc's pipeline tables are rendered with the colons after the header.

Moreover, if the table is the first thing in the document, its horizontal line above the header is not rendered at all.

Example:

| **Holiday n. 1** |            |
|:-----------------|:-----------|
| Start            | 2024-06-03 |
| End              | 2024-06-18 |
| Accounting       | 2024-06-25 |

| **Holiday n. 2** |            |
|:-----------------|:-----------|
| Start            | 2024-06-03 |
| End              | 2024-06-18 |
| Accounting       | 2024-06-25 |

Screenshot:
image

Expected behavior

Tables should be rendered without the colons that describe the alignment (and correct alignment of the columns) and the first table should be rendered with the first line above its header

Healthcheck output (:checkhealth render-markdown)

render-markdown: require("render-markdown.health").check()

markdown.nvim [neovim version] ~

  • OK Version >= 0.10

markdown.nvim [configuration] ~

  • OK valid

markdown.nvim [nvim-treesitter] ~

  • OK installed
  • OK markdown: parser installed
  • OK markdown_inline: parser installed
  • OK latex: parser installed
  • OK highlights enabled

markdown.nvim [executables] ~

  • OK latex2text: installed

Additional information

No response

@raffaem raffaem added the bug Something isn't working label Jul 24, 2024
@MeanderingProgrammer
Copy link
Owner

Virtual lines above the first line do not work quite how you would expect, this is a known issue in neovim: neovim/neovim#16166.

I'll see about replacing alignment colons, some users prefer them to be present, but maybe there's a better way to show this information.

Automatic column alignment will not be done by this plugin.

@raffaem
Copy link
Author

raffaem commented Jul 24, 2024

Automatic column alignment will not be done by this plugin.

I mean only visually of course.

The colons signal the column alignment.

@MeanderingProgrammer
Copy link
Owner

MeanderingProgrammer commented Jul 24, 2024

I am aware of what the colon signals.

If you want this plugin to take a left aligned column and align it to the right because the colon for the column is on the right side, even "only visually" that will not happen. At least for a while, I've tried implementing it before and it ends up inconsistent but I can give it another shot later.

@MeanderingProgrammer
Copy link
Owner

MeanderingProgrammer commented Jul 25, 2024

Alignment indicators added in this commit: a273033, which replace the colons.

Have a todo to maybe handle column alignment but I'll track that separately.

Please update and LMK what ya think.

@raffaem
Copy link
Author

raffaem commented Jul 26, 2024

Interesting, here is the new rendering of the example for reference:

image

@MeanderingProgrammer MeanderingProgrammer added not a bug Not a bug in this plugin and removed bug Something isn't working labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Not a bug in this plugin
Projects
None yet
Development

No branches or pull requests

2 participants