Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
/* Stylesheet generated by updateCSS.php */
|
2021-02-14 21:16:28 +00:00
|
|
|
pre { line-height: 125%; }
|
|
|
|
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
|
|
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
|
|
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
Update pygments to 2.7.2
Changes:
<https://github.com/pygments/pygments/blob/2.7.2/CHANGES#L15-L158>
The 2.7.2 release contains fixes to existing lexers, as well as the
following new lexers:
arrow, bare, devicetree, dmesg, dts, execline, fstar, gd, gdscript,
ipython, ipython2, ipython3, ipythonconsole, kmsg, llvm-mir,
llvm-mir-body, miniscript, mosel, ms, peg, pointless, promql, psysh,
raku, reason, reasonml, ride, sieve, singularity, tid, tnt, usd, usda,
webidl, and yang
To verify the integrity of the pygmentize binary, you can run
'create_pygmentize_bundle' and verify that the same pygmentize file is
created.
Change-Id: I0be3c1c204237b4a8873063e282be7ab8655be9d
2020-11-23 21:44:20 +00:00
|
|
|
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.mw-highlight .hll { background-color: #ffffcc }
|
Update pygments to 2.7.2
Changes:
<https://github.com/pygments/pygments/blob/2.7.2/CHANGES#L15-L158>
The 2.7.2 release contains fixes to existing lexers, as well as the
following new lexers:
arrow, bare, devicetree, dmesg, dts, execline, fstar, gd, gdscript,
ipython, ipython2, ipython3, ipythonconsole, kmsg, llvm-mir,
llvm-mir-body, miniscript, mosel, ms, peg, pointless, promql, psysh,
raku, reason, reasonml, ride, sieve, singularity, tid, tnt, usd, usda,
webidl, and yang
To verify the integrity of the pygmentize binary, you can run
'create_pygmentize_bundle' and verify that the same pygmentize file is
created.
Change-Id: I0be3c1c204237b4a8873063e282be7ab8655be9d
2020-11-23 21:44:20 +00:00
|
|
|
.mw-highlight { background: #f8f8f8; }
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.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 */
|
Update pygments bundle to 2.1
Changelog:
https://bitbucket.org/birkenfeld/pygments-main/raw/7614bf7/CHANGES
Lots of new lexers: Emacs Lisp, Arduino, Modula-2 with multi-dialect support,
Fortran fixed format, Archetype Definition language, Terraform, Jcl,
Easytrieve, ParaSail, Boogie, Turtle, Fish Shell, Roboconf, Test Anything
Protocol, Shen, Component Pascal, SuperCollider, Shell consoles (Tcsh,
PowerShell, MSDOS), Elm and J, Crmsh, Praat, CSound, Ezhil, Thrift, QVT
Operational, Hexdump, and CAmkES Configuration.
Bug: T125581
Change-Id: Ie881af3d1dff23f08ccc9cbcf5f94a084fa561e1
2016-02-02 21:37:11 +00:00
|
|
|
.mw-highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.mw-highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
|
|
|
|
.mw-highlight .cp { color: #BC7A00 } /* Comment.Preproc */
|
Update pygments bundle to 2.1
Changelog:
https://bitbucket.org/birkenfeld/pygments-main/raw/7614bf7/CHANGES
Lots of new lexers: Emacs Lisp, Arduino, Modula-2 with multi-dialect support,
Fortran fixed format, Archetype Definition language, Terraform, Jcl,
Easytrieve, ParaSail, Boogie, Turtle, Fish Shell, Roboconf, Test Anything
Protocol, Shen, Component Pascal, SuperCollider, Shell consoles (Tcsh,
PowerShell, MSDOS), Elm and J, Crmsh, Praat, CSound, Ezhil, Thrift, QVT
Operational, Hexdump, and CAmkES Configuration.
Bug: T125581
Change-Id: Ie881af3d1dff23f08ccc9cbcf5f94a084fa561e1
2016-02-02 21:37:11 +00:00
|
|
|
.mw-highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.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 */
|
2017-01-29 09:35:35 +00:00
|
|
|
.mw-highlight .sa { color: #BA2121 } /* Literal.String.Affix */
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.mw-highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
|
|
|
|
.mw-highlight .sc { color: #BA2121 } /* Literal.String.Char */
|
2017-01-29 09:35:35 +00:00
|
|
|
.mw-highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.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 */
|
2017-01-29 09:35:35 +00:00
|
|
|
.mw-highlight .fm { color: #0000FF } /* Name.Function.Magic */
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.mw-highlight .vc { color: #19177C } /* Name.Variable.Class */
|
|
|
|
.mw-highlight .vg { color: #19177C } /* Name.Variable.Global */
|
|
|
|
.mw-highlight .vi { color: #19177C } /* Name.Variable.Instance */
|
2017-01-29 09:35:35 +00:00
|
|
|
.mw-highlight .vm { color: #19177C } /* Name.Variable.Magic */
|
Highlight using Pygments rather than Geshi
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
2015-06-16 03:52:58 +00:00
|
|
|
.mw-highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
|