Permalink
Browse files

Reverted change in table builder for 'fixes' for multiple links in a …

…single cell. Does not work with link at end of row.
  • Loading branch information...
1 parent f3d5b94 commit baf4e71acfaa267f53e9490f210248af99d62239 @bluesliverx bluesliverx committed Oct 21, 2011
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/main/java/org/radeox/macro/table/TableBuilder.java
View
14 src/main/java/org/radeox/macro/table/TableBuilder.java
@@ -35,12 +35,14 @@ public static Table build(String content) {
String lastToken = null;
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
- String linkToken = token;
- while(linkToken.split("\\[").length != linkToken.split("\\]").length && tokenizer.hasMoreTokens()) {
- token = tokenizer.nextToken();
- linkToken += token;
- }
- token = linkToken;
+ String linkToken = "";
+ if(token.indexOf('[') != -1 && token.indexOf(']') == -1) {
+ while(token.indexOf(']') == -1 && tokenizer.hasMoreTokens()) {
+ linkToken += token;
+ token = tokenizer.nextToken();
+ }
+ token = linkToken + token;
+ }
if ("\n".equals(token)) {
// Handles "\n" - "|\n"
if (null == lastToken || "|".equals(lastToken)) {

0 comments on commit baf4e71

Please sign in to comment.