Author: Raymond Bosman
Date: 2006-12-20 10:26:42 +0100 (Wed, 20 Dec 2006)
New Revision: 4410
Log:
- Fixed some things.
Modified:
scripts/clone-empty.php
Modified: scripts/clone-empty.php
===================================================================
--- scripts/clone-empty.php 2006-12-20 08:24:56 UTC (rev 4409)
+++ scripts/clone-empty.php 2006-12-20 09:26:42 UTC (rev 4410)
@@ -118,14 +118,20 @@
{
$comment = $rc->getDocComment();
+ // Add the @class <CLASSNAME> to the docblock.
if( $type == "class" )
{
- $n = substr( $comment, 0, -4);
- $n .= "\n *\n * @class $class\n *";
- $n .= substr( $comment, -4);
+ $n = substr( $comment, 0, 4);
+ $n .= " * @class $class\n *\n";
+ $n .= substr( $comment, 4);
$comment = $n;
}
+ // Replace <note:> with <@note >
+
+ $comment = str_ireplace( "note:", "@note ", $comment );
+
+
$tokens = docblock_tokenize( $comment );
$new = "";
@@ -139,16 +145,19 @@
*/
+ $insideCode = false;
for ( $i = 0; $i < sizeof( $tokens ); $i++ )
{
if ( docblock_token_name( $tokens[$i][0] ) == 'DOCBLOCK_CODEOPEN' )
{
$tokens[$i][1] = "@code";
+ $insideCode = true;
}
elseif ( docblock_token_name( $tokens[$i][0] ) == 'DOCBLOCK_CODECLOSE'
)
{
$tokens[$i][1] = "@endcode";
+ $insideCode = false;
}
elseif( docblock_token_name( $tokens[$i][0] ) == 'DOCBLOCK_TAG' )
{
@@ -199,8 +208,14 @@
*/
}
- //$new .= str_replace( '$', '\a ', $tokens[$i][1] );
- $new .= $tokens[$i][1];
+ if( !$insideCode )
+ {
+ $new .= str_replace( '$', '\a ', $tokens[$i][1] );
+ }
+ else
+ {
+ $new .= $tokens[$i][1];
+ }
}
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components