ttscoff / cheaters

Customizable cheat sheet system for OS X
466 stars 108 forks source link

How to escape angle brackets in markdown tables? #29

Open prurph opened 1 year ago

prurph commented 1 year ago

I'm unable to escape angle brackets in markdown tables when a letter follows it. For example:

# Works: has spaces
| < div > |

# Work: character after anglebracket is not a-z
| <[URL]> |
| <123abc> |

# Don't work:
| <leader> |
| \<leader\> |

Is this possible? I'd like to include the literal <leader> in my vim cheatsheet!

ttscoff commented 1 year ago

Weird. I haven't played with Cheaters for a long time so I'm not recalling why this wouldn't work, but the easy solution is to put an HTML word separator character into the markup:

<&#8288;leader&#8288;>

The &#8288; inserts an invisible (zero-width) character and fixes the parsing of this particular markup.

-Brett

On 20 Dec 2022, at 16:19, Prescott Murphy wrote:

I'm unable to escape angle brackets in markdown tables when a letter follows it. For example:

# Works: has spaces
| &lt; div &gt; |

# Work: character after anglebracket is not a-z
| &lt;[URL]&gt; |
| &lt;123abc&gt; |

# Don't work:
| &lt;leader&gt; |
| \<leader\> |

Is this possible? I'd like to include the literal <leader> in my vim cheatsheet!

-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/cheaters/issues/29 You are receiving this because you are subscribed to this thread.

Message ID: @.***>