Skip to content
This repository

remove extra <br> tags, post Geshi parse #46

Open
wants to merge 1 commit into from

1 participant

Miguel Bermudez
Miguel Bermudez

I added some additional langages from the Geshi package for a site I'm working on and noticed I kept getting double <br> tags every time I had a newline in my content txt files. I think the markdown parser is adding <br>'s as well as Geshi, hence the doubling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 24, 2013
Miguel Bermudez remove extra <br> tags post Geshi parsin 1e8b4ab
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  plugins/highlight/highlight.php
1  plugins/highlight/highlight.php
@@ -13,6 +13,7 @@ function highlight($code, $lang) {
13 13
   $geshi->enable_classes();
14 14
   $geshi->enable_keyword_links(false);
15 15
   $code  = $geshi->parse_code();
  16
+  $code = str_replace('<br />', '', $code);
16 17
   return '<span class="' . $lang . '">' . $code . '</span>';
17 18
 
18 19
 }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.