The PHPDoc/JSDoc updates are mostly about generic "array" types that
can be made more specific.
In PHP we can remove documentation when it is 100% identical to the
type declarations in the code.
A few mistakes are fixed as well, e.g. a missing "null".
This patch also made a major mistake visible. It looks like the
$geshi2pygments compatibility map was broken since 2018. The array was
changed from values to keys via I7a852dd and some usages updated, but
one was forgotten.
Change-Id: I480999d21f2f69cba84166bb877aa75882778966
Steps to reproduce:
* Make a wikitext page with <syntaxhighlight line="sure">…</…>.
* Edit with VisualEditor and make an unrelated change to the content.
* Save.
* Before the attribute was always replaced with line="1".
* With this patch the old value stays untouched.
Change-Id: I433a206905c1a0a1bc06ef8b4037f6db9d935810
Follows-up 42c97fa (I82ed4ade), 63c5943a9 (Ic71346196).
This commit makes no functional changes, but it reduces overhead
from the SyntaxHighlight code when interacting with other features,
such as elaborate modals or other hashchange-heavy code paths that
a gadget might produce.
It uses vanilla DOM instead of jQuery where possible, and adds an
early return rather than fairly deep continuation no-ops.
Change-Id: I2264f6f398193802f05c738bad4c294da007fb27
Changes:
<https://github.com/pygments/pygments/blob/2.8.0/CHANGES#L10-L150>
The 2.8.0 release contains fixes to existing lexers, as well as the
following new lexers:
amdgpu, cddl, futhark, graphviz/dot, markdown
Bug: T274741
Change-Id: I84c32591a06aac5e1afe46dab1f80bb53d981bb3
The outer wrapper is 100% width, so making it position:relative
causes it to stack above floated elements.
Bug: T272853
Change-Id: I20a73b5086ebb03673f0435e27ca93432dcd000c
These rules were being kept for cached content, but were
actually breaking Firefox by triggering a multi-part selection.
Bug: T271614
Change-Id: I83fb4aab88fe1f34bc59d1da18ae8a6a4838a831
Content blocks always output a directionality class. It defaults
to LTR as most code is LTR, but it is allowed to set it to RTL
by adding a dir attribute to the <syntaxhiglight> block.
Use this class to do CSS flipping instead of CSSJanus, as this
class indicates the direction of the code.
Bug: T271792
Change-Id: I084550c2775febf13596addfb3598d6ae1afa2db
* direction:ltr default is not required as every block
gets an mw-content-ltr/rtl class and dir=ltr/rtl attr
* float rules for line numbers are no longer used as
they are now position:absolute
Change-Id: I417ae969bf969b7cb25fbcf9ca3b1457c7bc6549
The 'hll' CSS only targets the .linenos selector, but it doesn't
hurt to avoid unnecessary DOM changes.
Change-Id: Ic7134619606c6e4abc2480ddc9650d0352fc33da
no-descending-specificity:
Expected selector ".mw-highlight.mw-content-ltr .linenos" to come before
selector ".mw-highlight a:hover .linenos"
Change-Id: Ib8bd3dcc83058c6935b6b6c472554e3c1fa01eda
* Render a solid gutter that can take 3-4 digit line numbers
* Position line numbers absolutely in the gutter
* Add padding to code so that it doesn't wrap into the gutter
Change-Id: I7abb87452ad61808dad32b41c1d2d86b8ababb28
This makes them unselectable in more browsers as the
user-select fix isn't supported everywhere (e.g. Safari).
Bug: T32773
Change-Id: I274632a1055e1f85679fbb29c81629104cc8b222
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
Require that the node is modified and the language input is
valid before enabling the "done" action. Otherwise disable it.
Bug: T206481
Change-Id: Ie9d2907358ea585ba72628887c46af69f942772f