Skip to content
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

RFE: (better) support for grid tables #843

Open
sphakka opened this issue Aug 22, 2024 · 0 comments
Open

RFE: (better) support for grid tables #843

sphakka opened this issue Aug 22, 2024 · 0 comments

Comments

@sphakka
Copy link

sphakka commented Aug 22, 2024

Emacs-style "grid tables" are well supported by Pandoc. However markdown mode doesn't like them that much.

Expected Behavior

Grid table above are rendered wholly in markdown-table-face and are properly aligned by command markdown-table-align.

Actual Behavior

First problem, grid tables are rendered with mixed faces:

  • markdown-table-face for the contents
  • default face for the grid

Second problem, markdown-table-align doesn't work.

I'd be content of at least having them properly aligned, though full support would be best in the long term.

Steps to Reproduce

Take the Pandoc example as MWE:

+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+
  • Move the cursor on any grid line and run M-X describe-face. Result:
Face: default (sample) (customize this face)

Documentation:
Basic default face.

Defined in ‘faces.el’.
...
  • Move the cursor on any content line and run M-X describe-face. Result:
Face: markdown-table-face (sample) (customize this face)

Documentation:
Face for tables.
...
  • Move the cursor on any grid line and run M-X markdown-table-align. Result: the following line is screwed. F.i., on the first one it gives:
+---------------+---------------+--------------------+
| +---------------+---------------+--------------------+ |
  • Move the cursor on any content line and run M-X markdown-table-align. Result: only the "pipe-styled" part is aligned. The remainder of the table is ignored.

Software Versions

  • Markdown Mode: version 2.7-alpha
  • Emacs: GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-08-02
  • OS: GNU/Linux Gentoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant