Examples of JHamlConfig


Examples of com.cadrlife.jhaml.JHamlConfig

  }

  @Test
  public void selfClosingTags() {
    assertEquals("<p a='b' />", jhaml.parse("%p{:a => \"b\"}/"));
    for (String elem : new JHamlConfig().autoclose) {
      assertEquals("<" + elem + " />", jhaml.parse("%" + elem + ""));
    }
  }
View Full Code Here

Examples of com.cadrlife.jhaml.JHamlConfig

    }
  }
 
  @Test
  public void preserveTags() {
    for (String elem : new JHamlConfig().autoclose) {
      assertEquals("<" + elem + " />", jhaml.parse("%" + elem + ""));
    }
  }
View Full Code Here

Examples of com.cadrlife.jhaml.JHamlConfig

    assertEquals("<html a='a' b='b'></html>", render("%html(a b)"));
    assertEquals("<html a b></html>", renderWithFormat("html5", "%html(a b)"));
  }
 
  private String renderWithFormat(String format, String haml) {
    JHamlConfig config = new JHamlConfig();
    config.format = format;
    return new JHaml(config).parse(haml);
  }
View Full Code Here

Examples of com.cadrlife.jhaml.JHamlConfig

    config.format = format;
    return new JHaml(config).parse(haml);
  }
 
  private String render(String haml) {
    JHamlConfig config = new JHamlConfig();
    return new JHaml(config).parse(haml);
  }
View Full Code Here

Examples of com.cadrlife.jhaml.JHamlConfig

  private String render(String haml) {
    JHaml jhaml = new JHaml();
    return jhaml.parse(haml);
  }
  private String renderWithFormat(String format, String haml) {
    JHamlConfig config = new JHamlConfig();
    JHaml jhaml = new JHaml(config);
    config.format = format;
    return jhaml.parse(haml);
  }
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.