[jboss-cvs] jboss-seam/src/test/misc/org/jboss/seam/test ...
Gavin King
gavin.king at jboss.com
Fri Jan 12 11:50:53 EST 2007
User: gavin
Date: 07/01/12 11:50:53
Added: src/test/misc/org/jboss/seam/test SeamTextTest.java
SeamTextTest.txt
Log:
seam text stuff
Revision Changes Path
1.1 date: 2007/01/12 16:50:53; author: gavin; state: Exp;jboss-seam/src/test/misc/org/jboss/seam/test/SeamTextTest.java
Index: SeamTextTest.java
===================================================================
package org.jboss.seam.test;
import java.io.InputStreamReader;
import java.io.Reader;
import org.jboss.seam.text.L;
import org.jboss.seam.text.P;
public class SeamTextTest
{
public static void main(String[] args) throws Exception {
Reader r = new InputStreamReader( SeamTextTest.class.getResourceAsStream("SeamTextTest.txt") );
L lexer = new L(r);
P parser = new P(lexer);
parser.startRule();
System.out.println(parser);
}
}
1.1 date: 2007/01/12 16:50:53; author: gavin; state: Exp;jboss-seam/src/test/misc/org/jboss/seam/test/SeamTextTest.txt
Index: SeamTextTest.txt
===================================================================
+Seam Text!
This page demonstrates Seam Text.
++Some examples:
Here is some wiki text:
*bold* |mono| -deleted- _underline_ /italic/ ^super^
This is a new paragraph. (Just leave a blank line.)
*/_Multiple -tags- styles_ can be nested!/*
Special characters can be escaped: \| \* \_
This is especially useful for HTML: \<notatag\> \¬anentity;
But if we don\'t want to use escapes in our preformatted
text, instead we can wrap it in single quotes:
'//This is some code:
<some-tag/>
"a string"
a_variable_name
a||b
x=y*z/2
</tag>'
We wrap quoted text in double quotes:
"This is a quote with /formatting/. The quote can cross multiple
lines, but a blank line does not start a new paragraph. If you
need multiple paragraphs in a quote, you have to use \<p\>."
You can even have "a quote", or 'some code' inside
a regular paragraph!
We use ordinary old HTML for tables:
<table>
<tr><td>foo</td><td>*bar*</td><td>baz</td></tr><tr>
<td>fee</td>
<td>fi</td>
<td>/fo/</td>
</tr>
</table>
And we can use HTML for lists:
<ol>
<li>foo</li>
<li>*bar*</li>
<li>/baz/</li>
</ol>
But if the items fit on a line, we can use \#
for ordered lists:
# item 1
# item 2
# item 3
And \= for unordered lists:
= item 1
= item 2
= item 3
We use HTML for <a href="http://www.hibernate.org/">links</a>.
And for images: <img src="http://www.hibernate.org/tpl/jboss/img/01_oben_logo.gif"/>
And even for more exotic formatting, for example:
<quote>This is a /HTML/ quote with a <a href="http://jboss.org/">link</a>,
and a "nested quote" and even 'some code' in it.</quote>
<p>
This is a HTML paragraph with some lists:
# item 1
# item 2
= an item
= another item
And "a quote" in it.
</p>
Oh, and one last thing:
"This is a quote with
= a list,
= with 2 items
and 'some code' and <a href="http://jboss.com/products/seam">yet another link</a>."
More information about the jboss-cvs-commits
mailing list