aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2013-05-01 17:14:36 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2013-05-01 17:21:49 -0400
commit32f247ed603a2b57ba0b30f4ce0d2429df33ab7e (patch)
tree9460d68357b88f6ed96ad30501b039111e98bf02 /phpBB
parent954edb3eb4f79d48c3fdf2e204791ea454145085 (diff)
downloadforums-32f247ed603a2b57ba0b30f4ce0d2429df33ab7e.tar
forums-32f247ed603a2b57ba0b30f4ce0d2429df33ab7e.tar.gz
forums-32f247ed603a2b57ba0b30f4ce0d2429df33ab7e.tar.bz2
forums-32f247ed603a2b57ba0b30f4ce0d2429df33ab7e.tar.xz
forums-32f247ed603a2b57ba0b30f4ce0d2429df33ab7e.zip
[ticket/11435] Fit comment into 80 columns and link to php manual.
PHPBB3-11435
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/template/filter.php36
1 files changed, 21 insertions, 15 deletions
diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php
index 9e8ad2fef0..c2c100e93e 100644
--- a/phpBB/includes/template/filter.php
+++ b/phpBB/includes/template/filter.php
@@ -224,28 +224,34 @@ class phpbb_template_filter extends php_user_filter
}
/*
- Preserve whitespace.
- PHP removes a newline after the closing tag (if it's there). This is by design.
+ Preserve whitespace.
+ PHP removes a newline after the closing tag (if it's there).
+ This is by design:
- Consider the following template:
+ http://www.php.net/manual/en/language.basic-syntax.phpmode.php
+ http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php
- <!-- IF condition -->
- some content
- <!-- ENDIF -->
- If we were to simply preserve all whitespace, we could simply replace all "?>" tags
- with "?>\n".
- Doing that, would add additional newlines to the compiled tempalte in place of the
- IF and ENDIF statements. These newlines are unwanted (and one is conditional).
- The IF and ENDIF are usually on their own line for ease of reading.
+ Consider the following template:
- This replacement preserves newlines only for statements that aren't the only statement on a line.
- It will NOT preserve newlines at the end of statements in the above examle.
- It will preserve newlines in situations like:
+ <!-- IF condition -->
+ some content
+ <!-- ENDIF -->
- <!-- IF condition -->inline content<!-- ENDIF -->
+ If we were to simply preserve all whitespace, we could simply
+ replace all "?>" tags with "?>\n".
+ Doing that, would add additional newlines to the compiled
+ template in place of the IF and ENDIF statements. These
+ newlines are unwanted (and one is conditional). The IF and
+ ENDIF are usually on their own line for ease of reading.
+ This replacement preserves newlines only for statements that
+ are not the only statement on a line. It will NOT preserve
+ newlines at the end of statements in the above example.
+ It will preserve newlines in situations like:
+
+ <!-- IF condition -->inline content<!-- ENDIF -->
*/