This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch io in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
commit 6432c8852fc0fc367bfce88dfcb2181d683b3268 Author: Elliotte Rusty Harold <elh...@ibiblio.org> AuthorDate: Sun Feb 19 10:01:13 2023 -0500 Prefer Apach commons utils to codehaus --- doxia-modules/doxia-module-markdown/pom.xml | 5 +++++ .../java/org/apache/maven/doxia/module/markdown/MarkdownParser.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doxia-modules/doxia-module-markdown/pom.xml b/doxia-modules/doxia-module-markdown/pom.xml index 4346ce69..3d9cdfbe 100644 --- a/doxia-modules/doxia-module-markdown/pom.xml +++ b/doxia-modules/doxia-module-markdown/pom.xml @@ -127,6 +127,11 @@ under the License. <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-module-xhtml5</artifactId> </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.11.0</version> + </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> diff --git a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java index eb9f25d9..610f4dc4 100644 --- a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java +++ b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java @@ -49,6 +49,7 @@ import com.vladsch.flexmark.ext.yaml.front.matter.YamlFrontMatterExtension; import com.vladsch.flexmark.html.HtmlRenderer; import com.vladsch.flexmark.util.ast.Node; import com.vladsch.flexmark.util.data.MutableDataSet; +import org.apache.commons.io.IOUtils; import org.apache.maven.doxia.markup.HtmlMarkup; import org.apache.maven.doxia.markup.TextMarkup; import org.apache.maven.doxia.module.xhtml5.Xhtml5Parser; @@ -56,7 +57,6 @@ import org.apache.maven.doxia.parser.AbstractTextParser; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.util.HtmlTools; -import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.xml.pull.XmlPullParser; /** @@ -267,7 +267,7 @@ public class MarkdownParser extends AbstractTextParser implements TextMarkup { */ String toHtml(Reader source) throws IOException { // Read the source - StringBuilder markdownText = new StringBuilder(IOUtil.toString(source)); + StringBuilder markdownText = new StringBuilder(IOUtils.toString(source)); // Now, build the HTML document StringBuilder html = new StringBuilder(1000);