From dee3a29c0248c497a9229043490b70cac17b8c12 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Fri, 6 Jan 2023 21:54:35 +0100 Subject: [PATCH] [MPIR-425] Verbatim content should be rendered as plain text --- .../AbstractProjectInfoRenderer.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoRenderer.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoRenderer.java index 90d9cbc6..26ea74b1 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoRenderer.java +++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoRenderer.java @@ -105,5 +105,41 @@ protected void text( String text ) } } + /* FIXME The next two methods need to be retained until Doxia and Maven Reporting Impl properly implement + * the difference of a (boxed) real verbatim text and (boxed) source code. + */ + /** + * {@inheritDoc} + */ + @Override + protected void verbatimText( String text ) + { + sink.verbatim( null ); + + text( text ); + + sink.verbatim_(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void verbatimLink( String text, String href ) + { + if ( StringUtils.isEmpty( href ) ) + { + verbatimText( text ); + } + else + { + sink.verbatim( null ); + + link( href, text ); + + sink.verbatim_(); + } + } + protected abstract String getI18Nsection(); }