Last modified: 2014-11-17 10:35:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 17147 - Wrap the source (parts) in <code>
Wrap the source (parts) in <code>
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
SyntaxHighlight (GeSHi) (Other open bugs)
unspecified
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: semantic-html
  Show dependency treegraph
 
Reported: 2009-01-24 18:29 UTC by Danny B.
Modified: 2014-11-17 10:35 UTC (History)
3 users (show)

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


Attachments

Description Danny B. 2009-01-24 18:29:12 UTC
Currently, the output is (without line numbers)

<div dir="ltr" style="text-align: left;">
<pre class="source-html4strict">
<span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Hello world!<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span>
</pre></div>

or with line numbers

<div dir="ltr" style="text-align: left;">
<div class="source-html4strict" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Hello world!<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span></div>
</li>
</ol>
</div>
</div>

but it should be semantically following:

<div dir="ltr" style="text-align: left;">
<pre class="source-html4strict"><code>
<span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Hello world!<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span>
</code></pre></div>

or with line numbers

<div dir="ltr" style="text-align: left;">
<div class="source-html4strict" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1"><code><span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Hello world!<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span></code></div>
</li>
</ol>
</div>
</div>

(<code> wrapper added since everything in <source> is code).

It will perhaps need some stylesheet tweaks along.
Comment 1 entlinkt 2010-06-23 07:03:14 UTC
*** Bug 23708 has been marked as a duplicate of this bug. ***
Comment 2 Antoine "hashar" Musso (WMF) 2012-03-04 10:51:24 UTC
What our extension does, is that it enclose Geshi output either in a span or a div depending on GESHI_HEADER_NONE, so this is not an upstream bug.

The bug is asking to enclose the output of Geshi in a <code> element.  What Geshi does is that it takes some code and output an HTML rendered version of it which has semantically nothing to do with the original code. It is just some HTML.

<code> is to be used to represent a fragment of code.

So wrapping the HTML rendered output in a code element will mean that the rendered HTML is actually the code we wanted to show. Which is obviously wrong.

Thus I am marking this as won't fix.

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


Navigation
Links