You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by jv...@locus.apache.org on 2000/10/27 07:36:25 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node ASTDirective.java
jvanzyl 00/10/26 22:36:25
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTDirective.java
Log:
Small fix for the bug where any #foo, where foo wasn't a valid directive, was rendered w/o the #.
So bgcolor="#FFFFFF" comes out as bgcolor="FFFFFF". Questions to geir (geirm@optonline.net).
Revision Changes Path
1.3 +9 -2 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
Index: ASTDirective.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTDirective.java 2000/10/21 01:36:49 1.2
+++ ASTDirective.java 2000/10/27 05:36:25 1.3
@@ -56,8 +56,15 @@
if (isDirective)
directive.render(context, writer, this);
else
- writer.write(directiveName);
-
+ {
+ /*
+ * gmj : must put the # in front, as in the vm file
+ * this would have been something like #directiveName
+ */
+
+ writer.write("#" + directiveName);
+ }
+
return true;
}
}