Index: ed_readmore.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ed_readmore/ed_readmore.module,v retrieving revision 1.8 diff -u -p -r1.8 ed_readmore.module --- ed_readmore.module 21 Apr 2009 21:02:56 -0000 1.8 +++ ed_readmore.module 24 Aug 2009 18:19:18 -0000 @@ -71,6 +71,13 @@ function ed_readmore_admin_settings() { '#default_value' => variable_get('ed_readmore_placement', ED_READMORE_PLACEMENT_DEFAULT), '#description' => t('For more information about how this is done, read this Angry Donuts post.', array('@link' => url('http://www.angrydonuts.com/the_nuisance_of_the_read_more_fl'))), ); + + $form['ed_readmore_display']['ed_readmore_inline_elements'] = array( + '#type' => 'textfield', + '#title' => t('Content wrapping elements'), + '#default_value' => variable_get('ed_readmore_inline_elements', 'p'), + '#description' => t('A comma seperated list of elements into which the Read More link may be inserted, if added inline.'), + ); $form['ed_readmore_display']['ed_readmore_remove'] = array( '#type' => 'checkbox', @@ -144,10 +151,12 @@ function ed_readmore_preprocess_node(&$v */ function ed_readmore_link_place($teaser, $node, $display) { if ($display == 'inline') { - $block_tags = '(?:p)'; - // Get last position of the last closing marker - // If found, insert the link before the marker - if (preg_match('!]*>$!i', $teaser, $match, PREG_OFFSET_CAPTURE)) { + $elements = check_plain(variable_get('ed_readmore_inline_elements', 'p')); + $elements = array_map('trim', explode(',', $elements)); + $block_tags = '('. implode('|', $elements) .')'; + // Get last position of the last closing markers + // If found, insert the link before the markers + if (preg_match('!(]*>)+$!i', $teaser, $match, PREG_OFFSET_CAPTURE)) { $teaser = substr_replace($teaser, ' '. ed_readmore_link_render($node, $display), $match[0][1], 0); } else {