Add a line counter for `<source>` tag.
Closed, ResolvedPublic

Description

It would be cool if when you enter in a source tag, it would have the line numbers to the left side.

Reasons:
Good for referencing lines (in line 3, X happened to Y so Z can take place)

Requirements
When selecting text, the line number isn't picked up. This would make it easy to copy paste.

russellg created this task.Jan 16 2016, 6:59 AM
russellg updated the task description. (Show Details)
russellg raised the priority of this task from to Needs Triage.
russellg added a project: WikiToLearn.
russellg moved this task to Mediawiki development on the WikiToLearn board.
russellg added a subscriber: russellg.
russellg triaged this task as Normal priority.Jan 16 2016, 7:27 AM
ruphy added a subscriber: ruphy.Feb 6 2016, 7:05 PM

works for OCG, needs to be fixed in the web version...

ruphy added a comment.EditedFeb 6 2016, 7:23 PM

Research shows that this is now finally stable:

https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

thus this feature comes for free when we set line=1 in the tag.

CSS still needs to be monospaced though, but you can see a preliminary result here:
http://it.wikitolearn.org/Java/Variabili#Dichiarazione_di_variabile

ruphy added a subscriber: atundo.Feb 6 2016, 7:25 PM

OK, now for consistency reasons maybe it's better to turn off line numbering if not present in the web version?
@atundo what do you think about it?

ruphy closed this task as Resolved.Mar 10 2016, 5:37 PM
ruphy claimed this task.

OK, guess everything is fixed now?