Author: christian.bauer(a)jboss.com
Date: 2009-12-08 04:32:48 -0500 (Tue, 08 Dec 2009)
New Revision: 11792
Modified:
branches/community/Seam_2_2/seam-text.g
Log:
Customizable preformatted block rendering
Modified: branches/community/Seam_2_2/seam-text.g
===================================================================
--- branches/community/Seam_2_2/seam-text.g 2009-12-08 01:45:36 UTC (rev 11791)
+++ branches/community/Seam_2_2/seam-text.g 2009-12-08 09:32:48 UTC (rev 11792)
@@ -449,8 +449,8 @@
return "<p class=\"seamTextPara\">\n";
}
- protected String preformattedOpenTag() {
- return "<pre class=\"seamTextPreformatted\">\n";
+ protected String preformattedText(String text) {
+ return "<pre class=\"seamTextPreformatted\">\n" + text
+ "</pre>\n";
}
protected String blockquoteOpenTag() {
@@ -515,9 +515,12 @@
DOUBLEQUOTE newlineOrEof { append("</blockquote>\n"); }
;
-preformatted: BACKTICK { append( preformattedOpenTag() ); }
+preformatted: BACKTICK
+ { beginCapture(); }
(word|punctuation|specialChars|moreSpecialChars|htmlSpecialChars|space|newline)*
- BACKTICK { append("</pre>"); }
+ { String text=endCapture(); }
+ { append( preformattedText(text) ); }
+ BACKTICK
;
plain: word|punctuation|escape|space|link|macro