Page MenuHomePhabricator

Line numbers are outside of left border when using <source ... line start= > on RTL wikis
Closed, ResolvedPublic

Description

I checked in ar, he, fa (rtl wikis) that Syntax highlighting has problem with "line start=" argument and I changed my personal common.css but it changes margin of all <source>.
would you please solve it or tell me which code we have to add to MediaWiki:common.css or MediaWiki:Geshi.css to solve it?
sample:
http://fa.wikipedia.org/wiki/%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:Reza1615/syntax


Version: unspecified
Severity: normal

Details

Reference
bz33538

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:10 AM
bzimport added projects: SyntaxHighlight, I18n.
bzimport set Reference to bz33538.
bzimport added a subscriber: Unknown Object (MLST).
Yamaha5 created this task.Jan 5 2012, 1:06 PM

Hmm, thats kind of odd.

In my testing with firebug, replace the 'mw-content-rtl' class with 'mw-content-ltr' on the content div magically fixed everything, but what's actually going on here is a bit beyond me.

Fixed in r108171: the source tag now has an mw-content-ltr class. (The page itself should still have a mw-content-rtl because the text is supposed to be in Persian, but the source code is LTR).

(In reply to comment #2)

Fixed in r108171: the source tag now has an mw-content-ltr class. (The page
itself should still have a mw-content-rtl because the text is supposed to be in
Persian, but the source code is LTR).

Will this break stuff that expect a .mw-content-ltr containing all contents?

Yes, it will break. You should not expect that, mw-content-ltr/rtl is designed to be used for all kinds of wikitext, both a whole page, sections of a page, and other things like e.g. CodeReview comments.

(See https://www.mediawiki.org/wiki/Directionality_support#Wiki_content for some more info)

(In reply to comment #4)

Yes, it will break. You should not expect that, mw-content-ltr/rtl is designed
to be used for all kinds of wikitext, both a whole page, sections of a page,
and other things like e.g. CodeReview comments.
(See https://www.mediawiki.org/wiki/Directionality_support#Wiki_content for
some more info)

It was a good selector for all parser-generated stuff... and I (maybe also others) really want one.

(In reply to comment #5)

It was a good selector for all parser-generated stuff... and I (maybe also
others) really want one.

Maybe open a bug to request such a class (maybe there's already a bug). It's easy to add.