Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi: I'm having a small problem due to the fact that the Markdown() function adds extra carriage returns to the end of its rendered output:
Line 201:
# Make sure $text ends with a couple of newlines:
$text .= "\n\n";
This causes CCK to interpret the field as non-empty, and it displays the field label with no field value.
I worked around it by just wrapping the _marksmarty_process in a trim function.
Comments
Comment #1
milianw CreditAttribution: milianw commentedtrim
might not be a good idea,rtrim
would be better. Take this markdown output for example:rtrim
would be finde, but trim would un-indent the first line.An even better fix in my eyes would be to check for empty text in the process function:
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedfixed this and moved include files
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.