Projet

Général

Profil

Révision 5721e759

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/highlightjs/contrib/highlight_js_filter/highlight_js_filter.module
117 117
  $text = preg_replace("/^\n/", '', preg_replace('@</?(br|p)\s*/?>@', '', str_replace('\"', '"', $text)));
118 118
  // Trim leading and trailing linebreaks
119 119
  $text = trim($text, "\n");
120
  // Escape newlines
121
  $text = nl2br($text);
122 120
  $class = empty($lang) ? '' : ' class="' . $lang . '"';
123 121
  $text = '<pre><code' . $class . '>' . highlight_js_filter_fix_spaces(str_replace(' ', '&nbsp;', $text)) . '</code></pre>';
124 122
  return $text;

Formats disponibles : Unified diff