mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
Adding bidi-isolation to reference numbers
This is a quick-fix to support proper rendering of <sup>[1]</sup> elements when the sentence contains a right-to-left word. Amended: Changed from working through jQuery 'wrap' to CSS unicode-bidi. Amended: Dos2Unix conversion to get rid of pesky hidden characters, also corrected all of Amire80's comments. Bug: 36032 Change-Id: If85efe5ff1e0a3c57ee2523656702db89df07145
This commit is contained in:
parent
2d97abf5f2
commit
5895bd048f
8
Cite.php
8
Cite.php
|
@ -85,6 +85,12 @@ $wgResourceModules['jquery.tooltip'] = $citeResourceTemplate + array(
|
|||
'position' => 'bottom',
|
||||
);
|
||||
|
||||
/* Add RTL fix for the cite <sup> elements */
|
||||
$wgResourceModules['ext.rtlcite'] = $citeResourceTemplate + array(
|
||||
'styles' => 'ext.rtlcite/ext.rtlcite.css',
|
||||
'position' => 'bottom',
|
||||
);
|
||||
|
||||
/**
|
||||
* @param $out OutputPage
|
||||
* @param $sk Skin
|
||||
|
@ -97,6 +103,8 @@ function wfCiteBeforePageDisplay( $out, &$sk ) {
|
|||
$out->addModules( 'ext.cite' );
|
||||
}
|
||||
|
||||
/* RTL support quick-fix module */
|
||||
$out->addModules( 'ext.rtlcite' );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
6
modules/ext.rtlcite/ext.rtlcite.css
Normal file
6
modules/ext.rtlcite/ext.rtlcite.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
/* Isolation to fix references in case of RTL words at the end of a reference */
|
||||
sup.reference {
|
||||
unicode-bidi: -moz-isolate;
|
||||
unicode-bidi: -webkit-isolate;
|
||||
unicode-bidi: isolate;
|
||||
}
|
Loading…
Reference in a new issue