Changed close tag prefix from ! to / to be more HTMLish

Added support for simple open tags using <tag
Refactored FormHelper to use new syntax / features

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6771 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
the_undefined 2008-05-08 13:14:47 +00:00
parent 075afb244a
commit de5f744a9c
2 changed files with 517 additions and 513 deletions

File diff suppressed because it is too large Load diff

View file

@ -425,10 +425,10 @@ class CakeTestCase extends UnitTestCase {
* array( * array(
* array('p' => true), * array('p' => true),
* 'textA', * 'textA',
* '!p', * '/p',
* array('p' => true), * array('p' => true),
* 'textB', * 'textB',
* '!p' * '/p'
* ) * )
* *
* You can also specify a pattern expression as part of the attribute values, or the tag being defined, * You can also specify a pattern expression as part of the attribute values, or the tag being defined,
@ -459,10 +459,12 @@ class CakeTestCase extends UnitTestCase {
$i = 0; $i = 0;
foreach ($normalized as $tags) { foreach ($normalized as $tags) {
$i++; $i++;
if (is_string($tags)) { if (is_string($tags) && $tags{0} == '<') {
if (preg_match('/^\*?!/', $tags, $match)) { $tags = array(substr($tags, 1) => array());
} elseif (is_string($tags)) {
if (preg_match('/^\*?\//', $tags, $match)) {
$prefix = array(null, null); $prefix = array(null, null);
if ($match[0] == '*!') { if ($match[0] == '*/') {
$prefix = array('Anything, ', '.*?'); $prefix = array('Anything, ', '.*?');
} }
$regex[] = array( $regex[] = array(