'<<' in shell codeblock breaks formatting (or `>>`)

Steps to reproduce

  • create a new document with the following content:

- list:
```shell
cat << EOF > /tmp/file.txt
line 1
```
this line’s formatting gets broken

  • indent all content between and including the ‘```’ characteres.

Expected result

The formatting of the last line “this line’s formatting gets broken” should not change

Actual result

The formatting of the last line “this line’s formatting gets broken” did change.
If one of the ‘<’ characters is removed, the formatting behaves as expected.

Environment

  • Operating system:
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.13.23
    Installer version: v0.13.23
    Operating system: Windows 10 Pro 10.0.19044
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: on
    Base theme: dark
    Community theme: Atom
    Snippets enabled: 1
    Safe mode: off
    Plugins installed: 7
    Plugins enabled: 5
    1: Advanced Tables
    2: Dataview
    3: Obsidian Git
    4: Outliner
    5: Sliding Panes (Andy’s Mode)

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help 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 help vault or disable community plugins.


Additional information

images below of the issue reproduced in the help vault:
image
image
image
image

This behaviour occurs in the new and legacy editors.

2 Likes

thanks

1 Like

upstream report

Steps to reproduce

  1. Create note with two code blocks (see attachment for full test note)
    obsidian-bugs-bash<<EOF.md (290 Bytes)

1.1.

cat <<EOF
Line 1
Line 2
EOF

1.2.

echo test
  1. Put first code block inside quote block. Now formatting in edit mode is broken.
  2. Add any non-letter character between << and EOF e.g. <<-EOF. Now formatting should be fine.

Expected result

Intended code block with <<text shouldn’t break formatting for further code blocks inside editor mode.

Actual result

Code blocks after <<text inside quoted code block will be displayed as plain text inside editor mode, it will be fine in reading mode.

Environment

  • Operating system: Linux Manjaro
  • Debug info:
SYSTEM INFO:
	Obsidian version: v0.15.9
	Installer version: v0.15.9
	Operating system: #1 SMP PREEMPT Thu Aug 11 13:14:01 UTC 2022 5.10.136-1-MANJARO
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

Tested inside sandbox vault.

1 Like

any updates on this bug?

1 Like

Any updates on this bug? I have exactly the same issue and I think this is definitely worth fixing.

I’m also encountering this bug