Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php |
— | — | @@ -117,12 +117,9 @@ |
118 | 118 | if ( $enclose === GESHI_HEADER_NONE ) { |
119 | 119 | $attribs = self::addAttribute( $attribs, 'class', 'mw-geshi ' . $lang . ' source-' . $lang ); |
120 | 120 | } else { |
121 | | - if ( !isset( $attribs['dir'] ) ) { |
122 | | - $attribs = self::addAttribute( $attribs, 'dir', 'ltr' ); |
123 | | - } |
124 | | - |
125 | | - $attribs = self::addAttribute( $attribs, 'class', 'mw-geshi' ); |
126 | | - $attribs = self::addAttribute( $attribs, 'style', 'text-align: left;' ); |
| 121 | + // Default dir="ltr" (but allow dir="rtl", although unsure if needed) |
| 122 | + $attribs['dir'] = isset( $attribs['dir'] ) && $attribs['dir'] === 'rtl' ? 'rtl' : 'ltr'; |
| 123 | + $attribs = self::addAttribute( $attribs, 'class', 'mw-geshi mw-content-' . $attribs['dir'] ); |
127 | 124 | } |
128 | 125 | $out = Xml::tags( $encloseTag, $attribs, $out ); |
129 | 126 | |