If the length of an article including the source to highlight goes beyond the length of trimmed posts in the Drupal post settings then the trimmed article in the teaser does not contain any highlighting of the source.
Source code is diplayed as plain text, any formatting is removed, no colors.
The full article, following the "Read more" link, is highlightened correctly.

CommentFileSizeAuthor
#1 teaserbug.patch1.1 KBsoxofaan

Comments

soxofaan’s picture

Version: 6.x-1.x-dev » 5.x-2.x-dev
Assigned: Unassigned » soxofaan
Status: Active » Needs review
StatusFileSize
new1.1 KB

This is because the closing [/code] tag is trimmed in the teaser. The GeSHi filter tries to match paired [code]...[/code] tags however and when it doesn't find paired tags, it doesn't do the highlighting.
The patch in attachment (for the 5.x-2.x branch) enables the handling of an unpaired [code] tag,
but I'm not really sure if that patch should make it to the official version, since it is a problem with the teaser trimming, not the GeSHi filter.

Easy workaround is to control the teaser chop off point manually with "<--break-->".

BTW: do you really use the version from HEAD? You should use the versions from the 5.x-2.x branch, since current development happens there and not in HEAD for the moment.

soxofaan’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)