We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
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 - 21 Dec 2001 - 09:37:34 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback