1 | ||
1 | ||
1 | ||
1 |
There is an example here:
https://goatmatrix.net/c/Userscripts/9sBaPCiRRE
A few more language tests are here: https://goatmatrix.net/c/Test/4jUYrLspnx
This increases the value in specifying what language you are making a code block for so we can get the right syntax highlighting for it.
That's not hard to do:
You can start a codeblock by starting a line with three backticks: ```
To select the language you just put the language name after the backticks: ```css
Close the code block with a line with only three backticks: ```
I haven't tested what the language coverage is but I know we have support for javascript, python, c, bash, cpp, csharp aka cs, zig, erlang. Basically everything. Even config shit like nginx.
No support for synatx highlighting of english or spanish yet. Imagine the productivity boosts if we had that.
Python example
def middle_three_digits(i):
s = str(abs(i))
length = len(s)
assert length >= 3 and length % 2 == 1, "Need odd and >= 3 digits"
mid = length // 2
return s[mid-1:mid+2]
Finally! i saw it on the other one. this looks SOOOOOO MUCH BETTER!