Back to my blog Back to my projects

Dokuwiki ODT plugin

Ticket #19 (new enhancement)

Opened 20 months ago

limiting code block

Reported by: Jeffr76 Owned by:
Priority: major Version: 20101030
Keywords: Cc:

Description

Would there be an easy way to limit the code block size when doing an export
we have some code blocks that are large and really only need like 500 char for a given export
i have tried the following in renderer.php

function code($text, $language=null, $filename=null) {

we only want some of the code text, as they can be big
$maxsize = 200;
if (strlen($text) > $maxsize)
{

$text = substr($text, 0, $maxsize);

}
$this->_highlight('code', $text, $language);

}

but this can create invalid docs
any help would be appreciated

Note: See TracTickets for help on using tickets.