|
From: Nathan C. <na...@us...> - 2001-11-26 08:15:57
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv2226/includes
Modified Files:
bbcode.php
Log Message:
tabs-to-spaces and other indentation mojo for [code] bbcode.
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** bbcode.php 2001/11/25 23:31:04 1.15
--- bbcode.php 2001/11/26 08:15:53 1.16
***************
*** 534,537 ****
--- 534,546 ----
$after_replace = preg_replace($html_entities_match, $html_entities_replace, $after_replace);
+
+ // Replace all spaces with non-breaking spaces.
+ $after_replace = str_replace(" ", " ", $after_replace);
+
+ // Replace 3 nbsp's with " " so non-tabbed code indents without making huge long lines.
+ $after_replace = str_replace(" ", " ", $after_replace);
+
+ // Replace tabs with " " so tabbed code indents sorta right without making huge long lines.
+ $after_replace = str_replace("\t", " ", $after_replace);
$str_to_match = "[code:1:$uid]" . $before_replace . "[/code:1:$uid]";
|