[X] I searched for existing Bug Reports and found no similar reports.
Expected Behavior
The expected behavior is that Markdown Attributes would not match in any code blocks and we'd see something like this:
Current behaviour
However, when Markdown Attributes is enabled it matches {TERM} and hides that section of code:
I believe this is distinct from #5 because it's contextually specific based upon the language the code block is using. Of all the languages I've tried the only time it matches the {TERM} string and hides it is using sh, bash and zsh. As you can see, it is behaving normally when no language is present, it also does not happen for JS, Python, C, Go, Rust and about a dozen other alternatives that I tried.
As far as I can tell, it also only matches if it's preceded by a $ so I suspect this might be an regex error though it's strange that it only happens in shell blocks.
This only happens in live preview mode, reading mode appears normal. I've also disabled every other plugin (including editor syntax highlighting) and snippet to rule out incompatibility with another modification.
Reproduction
Enable Markdown Attributes
Create a code block
Set the syntax to sh
Add a line that includes $ followed by { ... } anywhere in the code block, even on new lines.
Here is the specific code I used in the screenshots:
```
if [ "${TERM}" = xterm ]; then TERM=xterm-256color; fi
```
```sh
if [ "${TERM}" = xterm ]; then TERM=xterm-256color; fi
```
Which Operating Systems are you using?
[ ] Android
[ ] iPhone/iPad
[ ] Linux
[X] macOS
[ ] Windows
Obsidian Version Check
1.5.11
Plugin Version
1.2.2
Confirmation
[X] I have disabled all other plugins and the issue still persists.
Check for existing bug reports before submitting.
Expected Behavior
The expected behavior is that Markdown Attributes would not match in any code blocks and we'd see something like this:
Current behaviour
However, when Markdown Attributes is enabled it matches
{TERM}
and hides that section of code:I believe this is distinct from #5 because it's contextually specific based upon the language the code block is using. Of all the languages I've tried the only time it matches the
{TERM}
string and hides it is usingsh
,bash
andzsh
. As you can see, it is behaving normally when no language is present, it also does not happen for JS, Python, C, Go, Rust and about a dozen other alternatives that I tried.As far as I can tell, it also only matches if it's preceded by a
$
so I suspect this might be an regex error though it's strange that it only happens in shell blocks.This only happens in live preview mode, reading mode appears normal. I've also disabled every other plugin (including editor syntax highlighting) and snippet to rule out incompatibility with another modification.
Reproduction
sh
$
followed by{ ... }
anywhere in the code block, even on new lines.Here is the specific code I used in the screenshots:
``` if [ "${TERM}" = xterm ]; then TERM=xterm-256color; fi ```
```sh if [ "${TERM}" = xterm ]; then TERM=xterm-256color; fi ```
Which Operating Systems are you using?
Obsidian Version Check
1.5.11
Plugin Version
1.2.2
Confirmation
Possible solution
No response