I post code examples on my site
Sometimes posts are as short as:
------
function MyFunc() example:
<code>
// a lot of code here
</code>
------

When teaser is generated, only opening tag fits into allowed length. Therefore all the front page below looks weird.

Comments

bryan kennedy’s picture

I am experiencing this as well. Flexinode is choping any of my code imcluding image tags right in half at what seems to be an arbitrary point. It is not acknowledging the teaser length set by the whole drupal site.

seanr’s picture

Title: Textarea teaser doesn't close tags » Textarea teaser not using node_teaser (was: doesn't close tags)
StatusFileSize
new934 bytes

This patch fixes field_textarea.inc to generate the teaser using the proper node_teaser function. It was prevously hardcoded using the substr. I have tested this patch on my system and it works perfectly as far as I can tell.

seanr’s picture

Status: Active » Needs review

forgot to change the status (done).

bryan kennedy’s picture

Version: » 4.6.x-1.x-dev

This patch failed for me. I ran:

patch < field_textarea.inc.patch

and got these errors:

(Stripping trailing CRs from patch.)
patching file field_textarea.inc
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 49 with fuzz 1.

Any ideas?

bryan kennedy’s picture

Ooops. I made a mistake in the above post. I assumed the above messages were an error. But I realized that the patch did come through okay. I tested this patched version of the module and it worked for me running 4.7rc3.

It fixed the problem with the teasers not following the overall Drupal settings.

+1

bryan kennedy’s picture

Version: 4.6.x-1.x-dev » master
StatusFileSize
new647 bytes

So while the patch above did fix the problem it had some errors in it and was technically against 4.6.

Here is a patch made against the current CVS version of flexinode that shouldn't give any errors.

samc’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new875 bytes

Couldn't get the patch to apply, but I did it manually and it tests out great.

A much needed fix for flexinode. Thanks all.

Rerolled patch attached.

Bèr Kessels’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)