Skip to content

Support escaping pipes (eg. \|) inside tables #2217

Closed

Description

@matthewmueller

Right now there's no way to add a | inside a markdown table because it will complete the table. It's not possible to escape it either.

This came up in our full text documentation. The syntax below is wrong, it should be cat | fox, but the | closes the table

CleanShot 2021-08-26 at 13 52 53@2x

Activity

  1. changed the title [-]Support escaping pipes (\|)[/-] [+]Support escaping pipes (\|) inside tables[/+] on Aug 26, 2021
  2. changed the title [-]Support escaping pipes (\|) inside tables[/-] [+]Support escaping pipes (eg. \|) inside tables[/+] on Aug 26, 2021
  3. molebox commented on Aug 30, 2021

    @molebox
    Contributor

    A simple solution to this, for now, would be to remove the inline code blocks. So instead of fox /| cat just write fox || cat

  4. matthewmueller commented on Sep 1, 2021

    @matthewmueller
    ContributorAuthor

    That's what I originally did after I noticed the problem, but it got flipped back later on. To me, this means it's an easy mistake to make.

    Another option is to make <code>fox | cat</code> equivalent to the backticks. Unfortunately, there's extra padding applied to inline <code> blocks, so it looks bad.

  5. molebox commented on Sep 1, 2021

    @molebox
    Contributor

    That's what I originally did after I noticed the problem, but it got flipped back later on. To me, this means it's an easy mistake to make.

    Another option is to make <code>fox | cat</code> equivalent to the backticks. Unfortunately, there's extra padding applied to inline <code> blocks, so it looks bad.

    We could create a simple component that wraps the code element and removes all padding. Call it Tablecode or something

  6. matthewmueller commented on Sep 2, 2021

    @matthewmueller
    ContributorAuthor

    Ah, I just realized you fixed this with <inlinecode> in https://github.com/prisma/docs/pull/2218/files

    That solves the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions