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('p' => true),
* 'textA',
* '!p',
* '/p',
* array('p' => true),
* 'textB',
* '!p'
* '/p'
* )
*
* 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;
foreach ($normalized as $tags) {
$i++;
if (is_string($tags)) {
if (preg_match('/^\*?!/', $tags, $match)) {
if (is_string($tags) && $tags{0} == '<') {
$tags = array(substr($tags, 1) => array());
} elseif (is_string($tags)) {
if (preg_match('/^\*?\//', $tags, $match)) {
$prefix = array(null, null);
if ($match[0] == '*!') {
if ($match[0] == '*/') {
$prefix = array('Anything, ', '.*?');
}
$regex[] = array(