Package com.google.template.soy.internal.base

Examples of com.google.template.soy.internal.base.CharEscaper.escape()


      // Source.
      ilb.appendLineStart("<source>");
      for (SoyMsgPart msgPart : msg.getParts()) {
        if (msgPart instanceof SoyMsgRawTextPart) {
          String rawText = ((SoyMsgRawTextPart) msgPart).getRawText();
          ilb.append(contentEscaper.escape(rawText));
        } else {
          String placeholderName = ((SoyMsgPlaceholderPart) msgPart).getPlaceholderName();
          ilb.appendParts("<x id=\"", attributeEscaper.escape(placeholderName), "\"/>");
        }
      }
View Full Code Here


      // Description and meaning.
      String desc = msg.getDesc();
      if (desc != null && desc.length() > 0) {
        ilb.appendLine(
            "<note priority=\"1\" from=\"description\">", contentEscaper.escape(desc), "</note>");
      }
      String meaning = msg.getMeaning();
      if (meaning != null && meaning.length() > 0) {
        ilb.appendLine(
            "<note priority=\"1\" from=\"meaning\">", contentEscaper.escape(meaning), "</note>");
View Full Code Here

            "<note priority=\"1\" from=\"description\">", contentEscaper.escape(desc), "</note>");
      }
      String meaning = msg.getMeaning();
      if (meaning != null && meaning.length() > 0) {
        ilb.appendLine(
            "<note priority=\"1\" from=\"meaning\">", contentEscaper.escape(meaning), "</note>");
      }

      // End 'trans-unit'.
      ilb.decreaseIndent();
      ilb.appendLine("</trans-unit>");
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.