Forums

Join
bbPress Support ForumsPluginsWhy is this format replacement needed?

Info

Why is this format replacement needed?

  1. Hi,

    I have some trouble with code posted without using backticks (i'm using a Geshi syntax plugin)

    I noticed that the function "bb_autop" inside the file "functions.bb-formatting.php" adds new line characters before and after each html open/close tag (ul, li...). Responsible for this modification are these two rows:

    $pee = preg_replace('!(<(?:ul|ol|li|blockquote|pre|p)[^>]*>)!', "\n", $pee);
    	$pee = preg_replace('!(</(?:ul|ol|li|blockquote|pre|p)>)!', "\n", $pee);

    why is this replacement done?

  2. Probably just to keep things tidy, if not you could end up with ridiculously long lines with all of a post's content on.

  3. strange is that without these replacements the posted code / content is formatted as well.
    the make sense of you have all posted html elements without any whitespace.

    Back to the reason why I started this topic, it's not an important one right? :)

  4. You must log in to post.