mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 18:49:22 +00:00
6484894497
GeSHi is unmaintained, lacks support for many popular modern languages, and suffers from deep architectural flaws, chief among them the inconsistent tokenization of different languages, each of which requires a custom stylesheet. Pygments is a well-maintained alternative. It is, by my count, the most popular syntax highlighting library around. It is BSD-licensed, actively maintained, and is widely used in PHP projects. To keep this easy to review, this change does not include update for l10n files, and it does not delete the geshi/ directory. I will do those in a separate patch. The chief change between this and the previous implementation is that errors result in the code block not being highlighted, as opposed to not being printed at all, having been replaced by an angry red error message. I think that is the right user experience. If you go to StackOverflow or GitHub and try to mark up your code block as being written in some language that their highlighter doesn't know about, you don't get an error message -- the code simply doesn't get highlighted. Because we don't recursively load dependencies for extensions, to test this, you will need to create a composer.local.json in $IP and add: { "extra": { "merge-plugin": { "include": [ "extensions/SyntaxHighlight_GeSHi/composer.json" ] } } } Then run `composer update`. Bug: T85794 Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
65 lines
4.1 KiB
CSS
65 lines
4.1 KiB
CSS
/* Stylesheet generated by updateCSS.php */
|
|
.mw-highlight .hll { background-color: #ffffcc }
|
|
.mw-highlight { background: #f8f8f8; }
|
|
.mw-highlight .c { color: #408080; font-style: italic } /* Comment */
|
|
.mw-highlight .err { border: 1px solid #FF0000 } /* Error */
|
|
.mw-highlight .k { color: #008000; font-weight: bold } /* Keyword */
|
|
.mw-highlight .o { color: #666666 } /* Operator */
|
|
.mw-highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
|
|
.mw-highlight .cp { color: #BC7A00 } /* Comment.Preproc */
|
|
.mw-highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
|
|
.mw-highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
|
|
.mw-highlight .gd { color: #A00000 } /* Generic.Deleted */
|
|
.mw-highlight .ge { font-style: italic } /* Generic.Emph */
|
|
.mw-highlight .gr { color: #FF0000 } /* Generic.Error */
|
|
.mw-highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
|
.mw-highlight .gi { color: #00A000 } /* Generic.Inserted */
|
|
.mw-highlight .go { color: #888888 } /* Generic.Output */
|
|
.mw-highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
|
.mw-highlight .gs { font-weight: bold } /* Generic.Strong */
|
|
.mw-highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
|
.mw-highlight .gt { color: #0044DD } /* Generic.Traceback */
|
|
.mw-highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
|
.mw-highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
|
.mw-highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
|
.mw-highlight .kp { color: #008000 } /* Keyword.Pseudo */
|
|
.mw-highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
|
.mw-highlight .kt { color: #B00040 } /* Keyword.Type */
|
|
.mw-highlight .m { color: #666666 } /* Literal.Number */
|
|
.mw-highlight .s { color: #BA2121 } /* Literal.String */
|
|
.mw-highlight .na { color: #7D9029 } /* Name.Attribute */
|
|
.mw-highlight .nb { color: #008000 } /* Name.Builtin */
|
|
.mw-highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
|
|
.mw-highlight .no { color: #880000 } /* Name.Constant */
|
|
.mw-highlight .nd { color: #AA22FF } /* Name.Decorator */
|
|
.mw-highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
|
|
.mw-highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
|
|
.mw-highlight .nf { color: #0000FF } /* Name.Function */
|
|
.mw-highlight .nl { color: #A0A000 } /* Name.Label */
|
|
.mw-highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
|
|
.mw-highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
|
|
.mw-highlight .nv { color: #19177C } /* Name.Variable */
|
|
.mw-highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
|
|
.mw-highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
|
.mw-highlight .mb { color: #666666 } /* Literal.Number.Bin */
|
|
.mw-highlight .mf { color: #666666 } /* Literal.Number.Float */
|
|
.mw-highlight .mh { color: #666666 } /* Literal.Number.Hex */
|
|
.mw-highlight .mi { color: #666666 } /* Literal.Number.Integer */
|
|
.mw-highlight .mo { color: #666666 } /* Literal.Number.Oct */
|
|
.mw-highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
|
|
.mw-highlight .sc { color: #BA2121 } /* Literal.String.Char */
|
|
.mw-highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
|
.mw-highlight .s2 { color: #BA2121 } /* Literal.String.Double */
|
|
.mw-highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
|
|
.mw-highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
|
|
.mw-highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
|
|
.mw-highlight .sx { color: #008000 } /* Literal.String.Other */
|
|
.mw-highlight .sr { color: #BB6688 } /* Literal.String.Regex */
|
|
.mw-highlight .s1 { color: #BA2121 } /* Literal.String.Single */
|
|
.mw-highlight .ss { color: #19177C } /* Literal.String.Symbol */
|
|
.mw-highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
|
.mw-highlight .vc { color: #19177C } /* Name.Variable.Class */
|
|
.mw-highlight .vg { color: #19177C } /* Name.Variable.Global */
|
|
.mw-highlight .vi { color: #19177C } /* Name.Variable.Instance */
|
|
.mw-highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
|