Info
- 3 posts
- 2 voices
- Started 2 years ago by Olaf
- Latest reply from Olaf
- This topic is not resolved
Why is this format replacement needed?
-
- Posted 2 years ago #
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?
-
- Posted 2 years ago #
Probably just to keep things tidy, if not you could end up with ridiculously long lines with all of a post's content on.
-
- Posted 2 years ago #
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? :)
-
You must log in to post.