@Test public void testTrimDescRemovesJavaDocLinks() { assertThat(DocGenerator.trimDesc("asdf\n \t \n {@link Jklo} "), is("asdf\n\n`Jklo` ")); assertThat(DocGenerator.trimDesc("asdf\n \t \n {@link Jklo } "), is("asdf\n\n`Jklo` ")); assertThat(DocGenerator.trimDesc("asdf\n \t \n {@link Jklo } "), is("asdf\n\n`Jklo` ")); assertThat(DocGenerator.trimDesc("asdf\n \t \n {@link org.Jklo } "), is("asdf\n\n`org.Jklo` ")); }
@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);  }