Package com.uwyn.jhighlight.renderer

Examples of com.uwyn.jhighlight.renderer.Renderer.highlight()


            if (null == encoding)
            {
              encoding = "UTF-8";
            }
           
            renderer.highlight(http_request.getServletPath().substring(1), is, os, encoding, false);
           
            String highlighted = os.toString("ISO-8859-1");
           
            response.setContentType("text/html");
            response.setContentLength(highlighted.length());
View Full Code Here


          String type = source.substring(lastDot + 1);
          Renderer renderer = XhtmlRendererFactory.getRenderer(type);
          if (renderer != null)
          {
            ByteArrayOutputStream output = new ByteArrayOutputStream();
            renderer.highlight(source, resourceAsStream, output, "UTF-8", true);
            return output.toString("UTF-8");
          }
        }

        CharSequence escaped = Strings.escapeMarkup(IOUtils.toString(resourceAsStream),
View Full Code Here

        {
          String type = name.substring(lastDot + 1);
          Renderer renderer = XhtmlRendererFactory.getRenderer(type);
          if (renderer != null)
          {
            return renderer.highlight(name, sb.toString(), "UTF-8", true);
          }
        }
        return Strings.escapeMarkup(sb.toString(), false, true).toString().replaceAll("\n", "<br />");
      }
      catch (IOException e)
View Full Code Here

            nbLines ++;
        }
        metadata.set("LoC", String.valueOf(nbLines));
        Renderer renderer = getRenderer(type.toString());
       
        String codeAsHtml = renderer.highlight(name, out.toString(), charset.name(), false);
       
        Schema schema = context.get(Schema.class, HTML_SCHEMA);

        org.ccil.cowan.tagsoup.Parser parser = new org.ccil.cowan.tagsoup.Parser();
        parser.setProperty(org.ccil.cowan.tagsoup.Parser.schemaProperty, schema);
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.