Tags:
create new tag
, view all tags

Question

Adding style to verbatim results in incorrect (x)html: a <verbatim> tag closed by a </pre> tag, as in this exemple (see source of this page, and view source in browser)

<verbatim style="color:#00a;border:solid thin;background: #ffb">
   some text
   styled
</verbatim>

  • TWiki version: Dec 01 2001
  • Web server:
  • Server OS:
  • Web browser:
  • Client OS:

-- ColasNahaboo - 13 Dec 2001

Answer

This is not supported in TWiki. You could hack this as a new rule in getRenderedVersion of TWiki.pm. This is the code (not tested out!!), changes in red:

        if( m|<verbatim([^>]*)>|i ) {
            s|<verbatim([^>]*)>|<pre$1>|goi;
            $insideVERBATIM = 1;
        }

This code will not go into the TWiki core.

-- PeterThoeny - 21 Dec 2001

Topic revision: r2 - 2001-12-21 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.