alonswartz / notesium

Markdown notes system with bi-directional links, Vim integration and local webapp
https://www.notesium.com
MIT License
60 stars 5 forks source link

Hide 3 backticks above and below when used for code block #50

Closed JedMeister closed 4 weeks ago

JedMeister commented 5 months ago

When indenting a codeblock it formats as a code, with nothing to hide.

When using a single backtick either side of inline code it formats as code and backticks are hidden.

But when using 3 backticks above and below the codeblock it formats as code but the backticks remain visible.

Demonstration:

image

JedMeister commented 5 months ago

Update:

I just discovered in the webUI that if a single backtick is used in the line above and below a code block something similar to, the behaviour I've requested occurs. I.e. the lines of text between the lines with a single backtick are formatted as a code block and backticks are hidden. Blank lines within the code block makes no difference.

However it is a little strange. IMO it's a bug.

Once a codeblock is created as per above, the backticks don't display until you hit backspace where they are. With inline code, they show as soon as you move the cursor to the line it's on. To remove one of the backticks, you need to hit backspace again. Also the backtick on the line above ends up at the start of the first line of the codeblock, which is totally uninitiative.

FWIW on Github:

JedMeister commented 4 weeks ago

On further usage and consideration I'm closing this. As I note in the comment above, the behaviour I requested is possible (using just a single backtick above and below) and TBH, now I've got used to it, I actually prefer the triple backticks being displayed... :grin: