Displaying blockquote character ">" in live preview and reading mode

Hi all,

I work sometimes with DNA sequences in obsidian. A popular format is the “FASTA” format:

>name
GATT
ACA

Basically “>” followed by a sequence name and the DNA sequence of the following line(s).

This clashes with the > blockquote format as the > is hidden in live preview and reading mode.

Can I change the CSS somehow to display the “>” in the same way as in source mode?
I found the thread below that is related, but I could not find a solution there.

I know I can achieve this with triple quotes, but I would like to have another solution if possible.

Thanks!

You can use the backslash “escape” character to escape most (all?) of markdown formatting:

\>name
GATT
ACA

CleanShot 2025-01-22 at 16.29.25


Other uses, for example: want a hyphen instead of making a list?

\- hi

or just a number and period, no ordered list:

1\. hello

and so on.

https://www.markdownguide.org/basic-syntax/#characters-you-can-escape

1 Like

Thanks for the reply, that actually works and it looks good too.

However, I have Python scripts depending on Biopython that rely on the exact format. Having to add and remove the backslash seem cumbersome at this point.

This is not something to be handled in CSS. If you want the > to lose its meaning you need to change the markdown parse engines used in editing and reading mode.

I reckon it then would be easier to change your python script to preparse and remove the extra backslash when needed.

Another visual alternative is to use <, an html escape. This is a little longer to type, but could be inserted using templates and so on, and it’s not unlikely that you could get it encoded correctly in your python script using one of the html entity methods.

1 Like

Note exactly lose its meaning, rather show up at all times should be enough.

Edit preview, No “>”
edit_preview

Edit preview, cursor on the first line “>”. Here we can see the “>”
edit_preview2

Source mode, “>” visible at all times.
source_mode

I would like to see the “>” as in the second example all the time.

What is the issue you’re trying to avoid by not choosing to use the code block triple quotes?

Simply practical, I find it hard to add/remove the triple quotes when copy pasting sequences in and out from obsidian.

I don’t know if you use Templater but if you do, you could use await tp.system.clipboard() to get the sequence, and then insert into whatever markdown coding you want.

1 Like