Examples of SoneTextParserContext


Examples of net.pterodactylus.sone.text.SoneTextParserContext

    Object sone = parameters.get("sone");
    if (sone instanceof String) {
      sone = core.getSone((String) sone).orNull();
    }
    FreenetRequest request = (FreenetRequest) templateContext.get("request");
    SoneTextParserContext context = new SoneTextParserContext(request, (Sone) sone);
    StringWriter parsedTextWriter = new StringWriter();
    try {
      Iterable<Part> parts = soneTextParser.parse(context, new StringReader(text));
      if (length > -1) {
        int allPartsLength = 0;
View Full Code Here

Examples of net.pterodactylus.sone.text.SoneTextParserContext

   * @param postPart
   *            The part to render
   */
  private void render(Writer writer, PostPart postPart) {
    SoneTextParser parser = new SoneTextParser(core, core);
    SoneTextParserContext parserContext = new SoneTextParserContext(null, postPart.getPost().getSone());
    try {
      Iterable<Part> parts = parser.parse(parserContext, new StringReader(postPart.getPost().getText()));
      StringBuilder excerpt = new StringBuilder();
      for (Part part : parts) {
        excerpt.append(part.getText());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.