• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4460: Incorrect rendering of source code

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension DpSyntaxHighlighterPlugin Urgent Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Incorrect rendering of XML document

Test code #1:

%CODE{lang="xml"}%
<root>
<element name="1" />
<element name="2" />
</root>
%ENDCODE%

Test code #2:

%CODE{lang="html" el="textarea"}%
<html metal:use-macro="views/standard_macros/view">
  <body>
    <div metal:fill-slot="body">

      <div class="row">
        <div class="label">Book Marks:</div>
        <br/><br/>
          <li tal:repeat="item view/listMarks">

            <a href="" tal:attributes="href item/url">
               <span tal:content="item/url">Link</span>
            </a>
            <pre tal:content="item/description">Description</pre>
            <br/>

          </li>
      </div>

    </div>
  </body>
</html>
%ENDCODE%

screen_02.png

Test code #3:

Look at the page http://twiki.falkolab.ru/bin/view/Zope/Zope3In30Minutes and find code string in chapter 2.1:

<script language='javascript'>dp.SyntaxHighlighter.ClipboardSwf = '/pub/TWiki/DpSyntaxHighlighterPlugin/dp.SyntaxHighlighter/Scripts/clipboard.swf';dp.SyntaxHighlighter.HighlightAll('code');</script>

What is it ?!

Test code #4:

class Mark(Contained):
    """Implementation of IMark   

      >>> from zope.interface.verify import verifyClass
      >>> verifyClass(IMark, Mark)
      True
    """

In this case when clicking on "copy to clipboard" link at the top of source region, in clipboard you can see code:

class Mark(Contained):
    """Implementation of IMark

      &gt;&gt;&gt; from zope.interface.verify import verifyClass
      &gt;&gt;&gt; verifyClass(IMark, Mark)
      True  
    """

>>> and &gt;&gt;&gt; is not same

-- TWiki:Main/AndreyTkachenko - 15 Aug 2007

Problem #1
The actual rendering of the XML is a problem with syntax highlighter, not the plugin. This needs to be reported to the highlighters maintainer.

Problem #2
The <p /> tags are caused by Item3757. This will be fixed in the next TWiki release (4.2).

Problem #3
Link does not work. That javascript should be at the bottom of the page, as it makes it all work. Think I can guess what the problem is, so will look in to it more later.

Problem #4
Sounds like another problem with the highlighter.

-- TWiki:Main.AndrewRJones - 28 Aug 2007

There is a new version of the highlighter out (1.5.1). I shall see whether this fixes the bugs your are seeing. If not, I will report the bugs.

-- TWiki:Main.AndrewRJones - 28 Aug 2007

#4 seems to be here: http://code.google.com/p/syntaxhighlighter/issues/detail?id=8 - fixed in 1.5.1

-- TWiki:Main.AndrewRJones - 28 Aug 2007

Bit of progress on #1
It seems this only occurs in Firefox, and not IE, so maybe Firefox is trying to do something with it. If you use el="textarea", the xml will be displayed properly in both.

See http://code.google.com/p/syntaxhighlighter/wiki/PreAndTextarea for more info.

-- TWiki:Main.AndrewRJones - 28 Aug 2007

ItemTemplate
Summary Incorrect rendering of source code
ReportedBy TWiki:Main.AndreyTkachenko
Codebase

SVN Range TWiki-4.1.2, Fri, 10 Aug 2007, build 14536
AppliesTo Extension
Component DpSyntaxHighlighterPlugin
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:14646 TWikirev:14647
TargetRelease n/a
ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng screen_02.png r1 manage 41.1 K 2007-08-15 - 20:36 AndreyTkachenko  
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-08-28 - AndrewRJones
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback