https://bugzilla.wikimedia.org/show_bug.cgi?id=20760


Gregg Lind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




--- Comment #2 from Gregg Lind <[email protected]>  2009-10-04 18:37:07 UTC 
---
[Attached bugfix]

Examined cases:  wrap='table' with line numbers has the correct copy and paste
behaviour in Firefox.  Without line numbers, it looks very similar to other
preformatted code.

Problems with bugfix:  it's hackish.  It relies on the particular format coming
back to protect the embedded newlines from Parser::doBlockLevels.  The
'righter' solution would be to only replace newlines with <br /> inside the
<pre> tags.  

Alternate Solutions:

Wrapping $out in <nowiki> tags doesn't seem to help protect things from
Parser::doBlockLevels.  


Example Markup:

<syntaxhighlight  lang='python'>
def hello():
    ''' print hello and exit'''
    print "hello"
</syntaxhighlight>

---

<syntaxhighlight line="GESHI_FANCY_LINE_NUMBERS" lang='python' enclose='div'>
def hello():
    ''' print hello and exit'''
    print "hello"
</syntaxhighlight>

---

<syntaxhighlight line="GESHI_FANCY_LINE_NUMBERS" lang='python' enclose='none'>
def hello():
    ''' print hello and exit'''
    print "hello"
</syntaxhighlight>

---
TABLEBASED

<syntaxhighlight line="GESHI_FANCY_LINE_NUMBERS" lang='python' enclose='table'>
def hello():
    ''' print hello and exit'''
    print "hello"
</syntaxhighlight>

---
TABLE,NOLINE

<syntaxhighlight lang='python' enclose='table'>
def hello():
    ''' print hello and exit'''
    print "hello"
</syntaxhighlight>


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to