You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Markdown tables use incorrect separation sytax on columns due to orgtbl-mode. This causes the table to not render correctly for static site generators or when viewing the markdown file on the GitHub web page.
orgtbl-mode is automatically enabled with markdown files if the org layer is enabled, forcing markdown TAB key to be hijacked by orgtbl and changing the pipe separator on columns to be a plus character +
The markdown style should be to use the Pipe character as a separator, according to the following Markdown syntax guides
In the layers/+lang/markdown/package.el file, orgtbl-mode is added via a function that uses add-hook to enble orgtbl-mode in markdown mode if the org layer is enabled
SPC SPC orgtbl-mode in a markdown buffer disables that mode and the TAB key returns to expected operation (the pipe is not changed to a plus character)
Please suggest changes or improvements to this code if applicable (this is my first attempt at such a change)
Reproduction guide 🪲
Start Emacs
Add org and markdown layers
Restart Emacs
Open a markdown file, .md
Create a table and press TAB in one of the cells
Observed behaviour: 👀 💔 TAB key forwards the cursor to the next column and changes the column header separator from a pipe character to a plus character
With orgtbl-mode automatically enabled by the markdown layer, the following table
Syntax
Description
Header
Title
Paragraph
Text
will be formatted with a plus character in the header section column divider
| Syntax | Description |
| ----------- + ----------- |
| Header | Title |
| Paragraph | Text |
This causes the table to not render correctly for static site generators or when viewing the markdown file on the GitHub web page.
Expected behaviour: ❤️ 😄 TAB should forward the cursor to the next column and formats the table layout if required, keeping the header separators as pipe characters
The table should still have the original syntax after pressing TAB
I propose a simple brute-force resolution that we should disable orgtbl entirely for markdown.
Though the intent of its inclusion is to provide some support for markdown table, we should not introduce such feature at the cost of introducing said bug.
And the reason for keeping orgtbl was to avoid existing configs. But apparently avoiding bugs that actually presents now should take priority over preventing potential bugs.
Description
Markdown tables use incorrect separation sytax on columns due to orgtbl-mode. This causes the table to not render correctly for static site generators or when viewing the markdown file on the GitHub web page.
orgtbl-mode is automatically enabled with markdown files if the
org
layer is enabled, forcing markdownTAB
key to be hijacked by orgtbl and changing the pipe separator on columns to be a plus character+
The markdown style should be to use the Pipe character as a separator, according to the following Markdown syntax guides
In the
layers/+lang/markdown/package.el
file,orgtbl-mode
is added via a function that usesadd-hook
to enble orgtbl-mode in markdown mode if theorg
layer is enabledSPC SPC orgtbl-mode
in a markdown buffer disables that mode and theTAB
key returns to expected operation (the pipe is not changed to a plus character)In Spacemacs issue #14774 a comment was made by a Spacemacs maintainer stating the orgtbl workaround was now obsolete
Should this `markdown/post-init-org hook is removed from the markdown layer?
Or at least a layer variable be added so that Spacemacs users can configure if orgtbl-mode is available by default.
For example, a variable could be defined to determine if orgtbl-mode should be enabled
Add a conditional check in the post-init-org function for the value of this var
And add a toggle in the packages list
Please suggest changes or improvements to this code if applicable (this is my first attempt at such a change)
Reproduction guide 🪲
.md
TAB
in one of the cellsObserved behaviour: 👀 💔
TAB
key forwards the cursor to the next column and changes the column header separator from a pipe character to a plus characterWith orgtbl-mode automatically enabled by the markdown layer, the following table
will be formatted with a plus character in the header section column divider
| Syntax | Description |
| ----------- + ----------- |
| Header | Title |
| Paragraph | Text |
This causes the table to not render correctly for static site generators or when viewing the markdown file on the GitHub web page.
Expected behaviour: ❤️ 😄
TAB
should forward the cursor to the next column and formats the table layout if required, keeping the header separators as pipe charactersThe table should still have the original syntax after pressing
TAB
System Info 💻
Backtrace 🐾
The text was updated successfully, but these errors were encountered: