@Test void renderWithDefaultText() { LinkRenderer.Rendering rendering = renderer.render(new WikiLinkNode("io.protostuff.Test")); assertEquals("#/types/io.protostuff.Test", rendering.href); assertEquals("io.protostuff.Test", rendering.text); }
@Override public Rendering render(WikiLinkNode node) { String source = node.getText(); String url = source; String text = source; int pos; if ((pos = source.indexOf('|')) >= 0) { url = source.substring(0, pos); text = source.substring(pos + 1); } return new Rendering("#/types/" + url, text); }
TypeLinkRenderer extends LinkRenderer { @Override public Rendering render(WikiLinkNode node) { String source = node.getText(); String url = source; String text = source; int pos; if ((pos = source.indexOf('|')) >= 0) { url = source.substring(0, pos); text = source.substring(pos + 1); } return new Rendering("#/types/" + url, text); } }
TypeLinkRenderer extends LinkRenderer { @Override public Rendering render(WikiLinkNode node) { String source = node.getText(); String url = source; String text = source; int pos; if ((pos = source.indexOf('|')) >= 0) { url = source.substring(0, pos); text = source.substring(pos + 1); } return new Rendering("#/types/" + url, text); }  }
TypeLinkRenderer extends LinkRenderer { @Override public Rendering render(WikiLinkNode node) { String source = node.getText(); String url = source; String text = source; int pos; if ((pos = source.indexOf('|')) >= 0) { url = source.substring(0, pos); text = source.substring(pos + 1); } return new Rendering("#/types/" + url, text); }  @Override Rendering render(WikiLinkNode node); }
TypeLinkRenderer extends LinkRenderer { @Override public Rendering render(WikiLinkNode node) { String source = node.getText(); String url = source; String text = source; int pos; if ((pos = source.indexOf('|')) >= 0) { url = source.substring(0, pos); text = source.substring(pos + 1); } return new Rendering("#/types/" + url, text); }  @Override Rendering render(WikiLinkNode node);  }