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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe characters within backticks treated as markdown table columns #187

Open
JamieMason opened this issue Mar 14, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@JamieMason
Copy link

Thanks @hosseinmd for this excellent plugin, it's a huge time saver 馃檶馃徎

I noticed a small issue I wanted to share with you (I have a workaround which is to just use OR in place of || in my example for now).

Steps to reproduce

Format a markdown table containing a pipe | character which is inside backticks - to represent code:

/**
 * | Scenario       | Pseudocode             | Outcome               |
 * | :------------- | :--------------------- | --------------------- |
 * | `Ok || Err`    | `pipe(Ok, or(Err))`    | `Ok`                  |
 * | `Err || Ok`    | `pipe(Err, or(Ok))`    | `Ok`                  |
 * | `Err1 || Err2` | `pipe(Err1, or(Err2))` | `Err2`                |
 * | `Ok1 || Ok2`   | `pipe(Ok1, or(Ok2))`   | `Ok1` (first Ok wins) |
 */

Expected Behaviour

The table remains formatted, it is the same as the original above.

Actual Behaviour

The pipe characters inside code blocks are interpreted as being markdown table columns:

/**
 * | Scenario | Pseudocode | Outcome |
 * | :------- | :--------- | ------- | ---------------------- | --------------------- |
 * | `Ok      |            | Err`    | `pipe(Ok, or(Err))`    | `Ok`                  |
 * | `Err     |            | Ok`     | `pipe(Err, or(Ok))`    | `Ok`                  |
 * | `Err1    |            | Err2`   | `pipe(Err1, or(Err2))` | `Err2`                |
 * | `Ok1     |            | Ok2`    | `pipe(Ok1, or(Ok2))`   | `Ok1` (first Ok wins) |
 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants