Backslash not shown in inline code blocks

Steps to reproduce

In any note, type an inline code block with a backslash character (e.g. \something, or even just \).

Did you follow the troubleshooting guide? [Y/N]

Yes I did :slight_smile:

Expected result

I would expect to see the backslash character in the inline code block, with no processing, independently of the cursor position.

Actual result

  • The code block is rendered correctly if the cursor is inside the block itself, or adjacent to one of the backticks.
  • An additional blank space is added after the backslash character if the cursor is on the same line, but not adjacent to the code block.
  • The backslash is not displayed at all if the cursor is on a different line.

Environment

SYSTEM INFO:
	Obsidian version: v1.6.1
	Installer version: v1.5.12
	Operating system: Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 23.5.0
	Login status: logged in
	Catalyst license: vip
	Insider build toggle: on
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

Here is a GIF showing the issue

GIF

5 Likes

Here’s mine:


I don’t see the behavior you describe, in either inline code or code blocks.

SYSTEM INFO:
Operating system: ios 17.5.1 (Apple iPhone14,5)
Obsidian version: 1.5.12 (134)
API version: v1.5.12
Login status: logged in
Catalyst license: none
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 41
Restricted mode: off
Plugins installed: 55
Plugins enabled: 15
1: Periodic Notes v0.0.17
2: Folder Note Core v1.3.5
3: Shortcut Launcher v1.1.0
4: Regex Find/Replace v1.2.0
5: Reveal Active File Button v2.0.3
6: Smart Random Note v0.2.1
7: Smart Typography v1.0.18
8: Sort & Permute lines v0.7.0
9: Calendar v1.5.10
10: Stille v1.3.4
11: Word Sprint v0.2.5
12: Custom File Explorer sorting v2.1.8
13: Advanced Merger v1.5.0
14: CSS Editor v1.1.0
15: Excalidraw v2.2.3

RECOMMENDATIONS:
[omitted]

SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.5.8
Operating system: Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 23.5.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 32
Restricted mode: off
Plugins installed: 54
Plugins enabled: 17
1: Periodic Notes v0.0.17
2: Folder Note Core v1.3.5
3: Shortcut Launcher v1.1.0
4: Regex Find/Replace v1.2.0
5: Reveal Active File Button v2.0.3
6: Smart Random Note v0.2.1
7: Quiet Outline v0.3.26
8: Sort & Permute lines v0.7.0
9: Natural Language Dates v0.6.2
10: Word Sprint v0.2.5
11: Calendar v1.5.10
12: Tag Wrangler v0.6.1
13: Stille v1.3.4
14: Garble Text v1.2.0
15: Text expand v0.11.4
16: Smart Typography v1.0.18
17: Custom File Explorer sorting v2.1.8

RECOMMENDATIONS:
[omitted]

…Those “snippets enabled” numbers are weirdly wrong — I have 24 out of 33 enabled, not 41 or 32. (There are another 5 in a subfolder.)

Inline codeblock has this problem.

`test \ing`

Could you please paste the output of the “Show debug info” command?

I can reproduce this with sandbox vault.

SYSTEM INFO:
Obsidian version: v1.6.1
Installer version: v1.5.12
Operating system: Windows 10 Home 10.0.19045
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

image
image

This seems to be a regression in 1.6.1 vs 1.5.x. I don’t think 1.6.0 had this problem either.

thanks

will be fixed v1.6.4. No ETAs.

3 Likes

I have the same issue, whether the backslash is in inline or not. When I tried to type \w: it removes the backslash. And when I type \w: without the inline code markers it still removess the backslash. This happens in sandbox mode as well. To reproduce the issue, the backslash must be the first character of a code block or sentence. For backslashes at the beginning of a sentence or line, it can be remedied by typing a second backslash or escape character. However, for code, this does not work.

SYSTEM INFO:
Obsidian version: v1.6.3
Installer version: v1.5.12
Operating system: Windows 10 Pro 10.0.22631
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: Minimal v7.5.4
Snippets enabled: 0
Restricted mode: off
Plugins installed: 17
Plugins enabled: 14
1: Importer v1.6.1
2: Advanced Tables v0.21.0
3: Paste URL into selection v1.7.0
4: Minimal Theme Settings v7.5.0
5: Style Settings v1.0.8
6: BRAT v1.0.1
7: Breadcrumbs v4.2.35-beta
8: Colored Tags v5.0.0
9: Tag Summary v2.1.5
10: Dataview v0.5.66
11: Open vault in VSCode v1.2.2
12: Buttons v0.5.1
13: Outliner v4.8.1
14: Highlightr v1.2.2

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

I hope this fix will be released very soon. This is a total showstopper for me. Rolling back versions now.

3 Likes

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