holger
(Holger Wolff, CLEX CMS)
3 November 2022 04:52
1
I’m trying to define the flavour of the code block by adding the programming language (none, python, fortran, bash) after the three backticks (`)
This is a general code block
for _ in range(5):
print("This is a test Python code")
PROGRAM TEST
implicit none
print *, "Fortran Code"
END PROGRAM TEST
$ echo "This is a Bash script"
1 Like
clairecarouge
(Claire Carouge, ACCESS-NRI Land Modelling Team Lead)
3 November 2022 22:12
2
It does not like Fortran much. The forgotten language.
Aidan
(Aidan Heerdegen, ACCESS-NRI Release Team Lead)
23 November 2022 04:38
3
Ask and you shall receive
PROGRAM test
implicit none
print *, "Fortran Code"
END PROGRAM test
1 Like
Aidan
(Aidan Heerdegen, ACCESS-NRI Release Team Lead)
23 November 2022 05:16
4
I have set the style to “androidstudio”, see here for all the possibilities
https://highlightjs.org/static/demo/
Note that they look nicer on the highlightjs page than here, might be the CSS interacting poorly. This one at least didn’t look too garish.
holger
(Holger Wolff, CLEX CMS)
24 November 2022 02:04
5
Interesting, it’s rendering your version correctly, but hasn’t changed the way my original text rendered it. (Even though it did change the background to black in the other code blocks. But I don’t think I did anything different.
I’m going to edit my original post and see what happens.
holger
(Holger Wolff, CLEX CMS)
24 November 2022 02:15
6
Once I changed anything (in my case I capitalised the TEST
, it worked.