Why does not this formatting works?

I wan to make this formatting work but the formatting does not work at all . What can I do to make it work?

it looks not formatted in the rendered page

Actual text
https://paste.debian.net/hidden/7cd7a3cc/

`LAlt up::
If (A_PriorKey = "LAlt") ;  If LAlt was pressed alone
    return ; do nothing
return

; In this case its necessary to define a custom combination by using "LAlt &" or "<!" 
; to avoid that LAlt loses its original function as a modifier key:

<!F4:: Send {Alt Down}{F4}{Alt Up} ; <! means LAlt`

    
`~LAlt::
KeyWait, LAlt
return
`


`~LAlt Up::
Send, {LAlt Up}
return
`

What’s this syntax and what’s the expected result?

it is autohotkey syntax

I just want those blocks to be individual code blocks. Putting them between “” (as I did there) does not render them as code blocks, try it.

here is the raw text that I want to code format in the note
https://paste.debian.net/hidden/c0ecb0a2/

@kartoo in markdown syntax you use triple back ticks or indentation to mark code blocks
For example replacing the single ticks with triple in your example produces the correct behavior on this website

If (A_PriorKey = "LAlt") ;  I`Preformatted text`f LAlt was pressed alone
    return ; do nothing
return

; In this case its necessary to define a custom combination by using "LAlt &" or "<!" 
; to avoid that LAlt loses its original function as a modifier key:

<!F4:: Send {Alt Down}{F4}{Alt Up} ; <! means LAlt
~LAlt::
KeyWait, LAlt
return
~LAlt Up::
Send, {LAlt Up}
return

Checkout a reference for formatting code in markdown here

1 Like

Thanks. I think that is close to what I was looking for.

Sure but the “code” icon in the menu does single tick. Any reason why it does a single tick instead of triple ones?

Yes, because the icons can be used to format selected text. Imagine you have a sentence, select one or two word(s) in the middle and hit the code icon. In that case the result would be something like:

This is the

selected text

in a sentence.

Insead of:

This is the selected text in a sentence.

1 Like