SyntaxHighlight: Difference between revisions

From Leo's Notes
This page was last edited on 19 May 2020, at 17:48.
→Fixed Issues: Moved terminal highlight issues to MediaWiki Custom Pygments
Issues now located at MediaWiki Custom Pygments
Line 11: Line 11:
}}
}}


}}
== Issues ==
Any highlight issues should go here.
=== Shell prompt shows partially as command if it contains a space ===
{{highlight|lang=terminal|code=
[root@kube ~]# kubectl get services --namespace=kube-system kubernetes-dashboard
NAME                  TYPE        CLUSTER-IP      EXTERNAL-IP  PORT(S)        AGE
kubernetes-dashboard  ClusterIP  10.108.158.128  <none>        443/TCP        2m36s
}}
=== Support heredoc ===
{{highlight|lang=terminal|code=
# cat <<EOF > /somewhere/something.txt
[something something]
this should all be grey text.
everything until the line with
a single EOF.
This should be grey too.
EOF
# this should be a command
## and comments should work
# cat /somewhere/something.txt
[something something]
...
}}
}}

Revision as of 17:48, 19 May 2020

The plugin being used is from http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi Terminal code uses a custom pygment.

Usage

To use SyntaxHighlight on this wiki, use the Highlight template.

{{highlight|lang=terminal|code=
code goes here
}}