Skip to:
Content
Pages
Categories
Search
Top
Bottom

Why is this format replacement needed?


  • Olaf Lederer
    Member

    @finalwebsites

    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$1", $pee);
    $pee = preg_replace('!(</(?:ul|ol|li|blockquote|pre|p)>)!', "$1n", $pee);

    why is this replacement done?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Probably just to keep things tidy, if not you could end up with ridiculously long lines with all of a post’s content on.


    Olaf Lederer
    Member

    @finalwebsites

    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? :)

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.