private String toPlainText(String code) { // remove [[link|text]] code = RegexUtils.replace(code, "\\[\\[([^\\]|]+)[|]([^\\]|]+)\\]\\]", "$2"); // remove [[link]] code = RegexUtils.replace(code, "\\[\\[([^\\]|]+)\\]\\]", "$1"); // remove ''text'' and '''text''' code = RegexUtils.replace(code, "[']+([^']+)[']+", "$1"); return code; }
private String toArticleName(String name) { name = StringUtils.trim(name); name = RegexUtils.trim(name, "_"); name = StringUtils.trim(name); name = StringUtils.ucfirst(name); return name; }
@Override public FreehalFile getChild(String name) { String child = path; if (!path.endsWith("/")) child += "/"; child += name; child = RegexUtils.replace(child, "[/]+", "/"); return new FreehalFile(new BerkeleyFile(child)); }