Backslashes in in-line code chunks

What I’m trying to do

I’d like to include backslashes in in-line code chunks that look the same as other code chunks in the Live Preview and in Reading view. I’m making a doc about regex patterns, and want to type things like A\d. This behaves normally in Reading mode, but in Live Preview, the slash is missing.

Things I have tried

  1. Escaping the slash is ineffective. Double slashes (\\) disappear in Live Preview, and both slashes appear in Reading view.
  2. The HTML code tag: Typing <code>A\d</code> works in tables in Live Preview and anywhere in reading mode, but does not style correctly outside of tables in Live Preview.
  3. Copying the CSS classes found via the developer panel, <span class="cm-inline-code cm-list-1">A\b</span> works for Live Preview but not for Reading view.
  4. <code><span class="cm-inline-code cm-list-1">A\b</span></code> does style the text in both Live Preview and Reading view, but the code chunk font size appears noticeably smaller when used in tables.

I realize that I could use #2 in tables and #4 outside of tables to get the desired effect, but I’m hoping that there is a simpler approach that I am missing.

Looks like this one. Should be fixed in the next public release if it’s the same issue:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.