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:
Moriel Schottlender 2013-04-30 16:19:08 -04:00
parent 2d97abf5f2
commit 5895bd048f
2 changed files with 14 additions and 0 deletions

View file

@ -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;
}

View 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;
}