Last modified: 2012-12-30 21:58: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 T40191, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38191 - Highlighting lines breaks copy&paste
Highlighting lines breaks copy&paste
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
SyntaxHighlight (GeSHi) (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-05 08:13 UTC by Michael M.
Modified: 2012-12-30 21:58 UTC (History)
1 user (show)

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


Attachments

Description Michael M. 2012-07-05 08:13:50 UTC
I'm not sure whether this actually is an upstream bug in GeSHi, so I just report it here:

When you highlight a line, the following linebreak is missing in the HTML source. When a user copies the code, the line break is missing in the copied text and may cause syntax errors.

Example:

<syntaxhighlight lang="text">
1
2
3
</syntaxhighlight>

<syntaxhighlight lang="text" highlight="2">
1
2
3
</syntaxhighlight>


Both display correctly, but while the relevant HTML for the first is

<pre class="de1">1
2
3
</pre>

the second has

<pre class="de1">1
<span class="xtra ln-xtra">2</span>3
</pre>

If you copy the result and paste it somewhere, you get

1
2
3

1
23

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


Navigation
Links