@Test public void testTrimEmptyPrefix() { assertThat(DocGenerator.trimDesc("asdf"), is("asdf")); assertThat(DocGenerator.trimDesc(" asdf"), is("asdf")); assertThat(DocGenerator.trimDesc("asdf\njklö"), is("asdf\njklö")); assertThat(DocGenerator.trimDesc("asdf\n\njklö"), is("asdf\n\njklö")); assertThat(DocGenerator.trimDesc("asdf\n \njklö"), is("asdf\n\njklö")); assertThat(DocGenerator.trimDesc("asdf\n \t \njklö"), is("asdf\n\njklö")); assertThat(DocGenerator.trimDesc("asdf\n \t \n jklö"), is("asdf\n\njklö")); assertThat(DocGenerator.trimDesc("asdf\n \t \n jklö "), is("asdf\n\njklö ")); }
@SuppressWarnings("squid:S4248") static String trimDesc(String s) { return s.replaceAll("^[ \t]+", "") .replaceAll("\\n[ \t]+", "\n") .replaceAll("\\{@link[ \t]+(?<name>[\\w.]*)[ \t]*}", "`${name}`"); }
DocGenerator { @SuppressWarnings("squid:S4248") static String trimDesc(String s) { return s.replaceAll("^[ \t]+", "") .replaceAll("\\n[ \t]+", "\n") .replaceAll("\\{@link[ \t]+(?<name>[\\w.]*)[ \t]*}", "`${name}`"); } }
DocGenerator { @SuppressWarnings("squid:S4248") static String trimDesc(String s) { return s.replaceAll("^[ \t]+", "") .replaceAll("\\n[ \t]+", "\n") .replaceAll("\\{@link[ \t]+(?<name>[\\w.]*)[ \t]*}", "`${name}`"); } DocGenerator(DocFileWriter docFileWriter); }
DocGenerator { @SuppressWarnings("squid:S4248") static String trimDesc(String s) { return s.replaceAll("^[ \t]+", "") .replaceAll("\\n[ \t]+", "\n") .replaceAll("\\{@link[ \t]+(?<name>[\\w.]*)[ \t]*}", "`${name}`"); } DocGenerator(DocFileWriter docFileWriter); void generateDoc(PluginDocTree pluginDocTree); }
DocGenerator { @SuppressWarnings("squid:S4248") static String trimDesc(String s) { return s.replaceAll("^[ \t]+", "") .replaceAll("\\n[ \t]+", "\n") .replaceAll("\\{@link[ \t]+(?<name>[\\w.]*)[ \t]*}", "`${name}`"); } DocGenerator(DocFileWriter docFileWriter); void generateDoc(PluginDocTree pluginDocTree);  }