Last modified: 2014-06-06 04:09:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29531, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27531 - SyntaxHighlight_GeSHi: Implement link anchors to line numbers of <source> contents
SyntaxHighlight_GeSHi: Implement link anchors to line numbers of <source> con...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
SyntaxHighlight (GeSHi) (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: Future release
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/MediaWik...
:
: 60410 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-18 12:47 UTC by Helder
Modified: 2014-06-06 04:09 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2011-02-18 12:47:47 UTC
When we open a SVN page like this
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/Resources.php?revision=82285&view=markup#l142
we are able to add #l___ to the url to create links pointing to a specific part of the code.

On [[MediaWiki:Common.js]] and other [[*.js]] and [[*.css]] pages, there is no way to do this at the momment.

It would be great to have such a feature, mainly for long script pages.

Similarly, it would probably be desirable to display such line numbers in those js and css pages.
Comment 1 Derk-Jan Hartman 2011-02-18 12:50:06 UTC
Implementing that isn't difficult. implementing the syntax coloring code to work in accordance with that, is probably the more challenging issue.
Comment 2 Helder 2011-02-18 13:08:17 UTC
FYI on code.google they use two columns, one for the line numbers and other for code. E.g.:

http://code.google.com/p/google-ajax-examples/source/browse/branches/javascript_playground/js/interactive_logic.js#2
Comment 3 Derk-Jan Hartman 2011-02-18 13:11:09 UTC
Checked, syntax extension does line based parsing as well, so less of a problem than I first thought.
Comment 4 db [inactive,noenotif] 2011-02-19 19:20:36 UTC
(In reply to comment #3)
> Checked, syntax extension does line based parsing as well, so less of a problem
> than I first thought.

Yes, use <source line lang=...></source>. But ids per line are not added.
Comment 5 Helder 2014-01-30 11:59:00 UTC
*** Bug 60410 has been marked as a duplicate of this bug. ***
Comment 6 Gryllida 2014-01-30 13:45:51 UTC
Is this a ::Parser bug? [[:mw:Extension:SyntaxHighlight_GeSHi]] seems to be responsible for <source> tag.
Comment 7 Krinkle 2014-06-06 04:08:37 UTC
The output would probably use something like <span id="mw-source-f2-l31"> where f2 indicates it is the second <source> section on the page, and l31 line 31.
Comment 8 Krinkle 2014-06-06 04:09:37 UTC
If handling potential multiple occurrences on a page is too difficult, we can at least start by supporting it on entire pages such as those in the MediaWiki and User namespaces for .js and .css.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links