No way to escape backticks

Steps to reproduce

I wanted the following Bash code in code blocks:

me=`whoami`

I tried the following:

`me=`whoami` `
```x=`whoami` ```
`me=\`whoami\` `

Expected result

I expected to see the code block:

me=`whoami`

Actual result

Instead of the expected result, what happened?

Screenshot:

Environment

OS: Linux
Browser: Firefox

4 Likes

Also reproducible on Mac/Google Chrome.

Confirmed; thereā€™s no way to escape with Markdown right now on Dynalist.

Honestly Iā€™m not sure if weā€™re going to add escaping or just wait for WYSIWYG, since WYSIWYG is going to make the entire current formatting system obsolete.

@Shida, how much work would this be? What do you think?

2 Likes

Not sure, we can try to patch it this time, but I think WYSIWYG might take some time. Itā€™ll depend on how much this is needed ATM.

1 Like

I donā€™t think itā€™s that urgent, but it would be nice to have if itā€™s low hanging fruit.

Your thoughts, @LinuxLefty?

1 Like

cant wait to WYSIWYG :clap::heart:

1 Like

Update: you can use \ to escape things now, cheers! Available in latest version on web, other platforms will follow soon.

Does this work for anyone?
Typing

`\``

gives me
\`
instead of

`

Yeah, thatā€™s the case. The backspace is contained between the two backticks.

Did you expect something different?

I expected the backslash to escape the following backtick, so the rendered code block would just show a single backtick. In my example above, nothing is escaped (as shown in the second code line): Only the backslash is inside the code block, followed by a single plain text backtick.

+@Shida could you take a look at this escape character issue?

Will take a look.

Just hit this issue today:

`log(\`test\`)`

Expected it to render as:

log(`test`)

Instead got:

log(\test`)`

However, I got around the issue with triple backticks, which rendered it as expected:

```log(`test`)```

It even included nice syntax highlighting :slight_smile:

So itā€™s not really an issue as thereā€™s a solid workaround, but out of curiosity was a fix for escaping a single backtick investigated?

Weird this was here since '17ā€¦ and still not fixed! I will track it this time and make sure itā€™s fixed soon.

Should be fixed in latest update.

1 Like

@shida It seems this change has caused a regression in code block (triple backticks).

For example:

```foo `bar` baz```

Previously correctly rendered as:

foo `bar` baz

Now renders as:

foo bar baz

Escaping them doesnā€™t help either:

```foo \`bar\` baz```

Renders as:

foo \bar\ baz

Can confirm this regression is now fixed.

1 Like