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

Aligning escaped markdown table #59

Closed
jsborjesson opened this issue Mar 11, 2015 · 3 comments
Closed

Aligning escaped markdown table #59

jsborjesson opened this issue Mar 11, 2015 · 3 comments

Comments

@jsborjesson
Copy link

Hey! First I gotta say that this is by far the best aligning plugin I've used, kudos!

I'm wondering if there is any easy way to correctly align a markdown table with escaped pipe symbols in it, for example one field in the table contains this one \| two.

Any ideas appreciated!

@junegunn
Copy link
Owner

The default |-rule does not take account for backslash-escaped pipe characters. So you need to use a regular expression to do that:

  • *
  • CTRL-X
  • \\\@<!|
    • meaning | not preceded (\@<!) by a backslash (\\)
  • Enter

I may even make it the default behavior for |. However, a quick search does not lead me to any article that suggests using backslash to escape pipe characters.

What do you think about it?

@jsborjesson
Copy link
Author

Shit, you're right. This is actually not valid markdown table-syntax, at least not in Markdown Here which is what I'm using. My bad, thank you for the quick and helpful response!

@MathieuDR
Copy link

However, a quick search does not lead me to any article that suggests using backslash to escape pipe characters.

This seems to be fixed in 2017. Perhaps this could be the default behaviour now? Or was something patched for this already?

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

3 participants