@Test public void content() { assertThat(analyser.getContents("")).isEqualTo("comment"); assertThat(analyser.getContents("")).isEqualTo(" comment "); assertThat(analyser.getContents("<!--comment-->")).isEqualTo("comment"); assertThat(analyser.getContents("<!-- comment -->")).isEqualTo(" comment "); assertThat(analyser.getContents(" assertThat(analyser.getContents(" }
@Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } } }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }  }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }  @Override String getContents(String comment); }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }  @Override String getContents(String comment);  }