Skip to content
Snippets Groups Projects
Commit 6b80956e authored by Marius Dumitru Florea's avatar Marius Dumitru Florea
Browse files

XWIKI-9370: PDF Export doesn't list the Table of Contents under certain circumstances

* Fix the xwiki-platform-feed-api build
parent 501efaa2
No related branches found
No related tags found
No related merge requests found
......@@ -374,7 +374,8 @@
<difference>
<differenceType>8001</differenceType>
<className>com/xpn/xwiki/util/TidyMessageLogger</className>
<justification>We dropped Tidy in favor of HTMLCleaner.</justification>
<justification>Has been moved to xwiki-platform-feed-api since it was the only module using it. We also
dropped Tidy in favor of HTMLCleaner.</justification>
</difference>
</ignored>
<excludes>
......
......@@ -41,6 +41,11 @@
<artifactId>xwiki-platform-oldcore</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jtidy</groupId>
<artifactId>jtidy</artifactId>
<version>r938</version>
</dependency>
<!-- RSS Feed processing -->
<dependency>
<groupId>rome</groupId>
......@@ -88,7 +93,8 @@
**/plugin/feed/SyndEntrySourceApi.java,
**/plugin/feed/SyndEntrySource.java,
**/plugin/feed/UpdateThread.java,
**/plugin/feed/XWikiFeedFetcher.java
**/plugin/feed/XWikiFeedFetcher.java,
**/util/TidyMessageLogger.java
</excludes>
</configuration>
</plugin>
......
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.xpn.xwiki.util;
import org.slf4j.Logger;
import org.w3c.tidy.TidyMessage;
import org.w3c.tidy.TidyMessageListener;
/**
* Utility class for logging JTidy messages.
*/
public class TidyMessageLogger implements TidyMessageListener
{
private final Logger logger;
public TidyMessageLogger(Logger logger)
{
this.logger = logger;
}
@Override
public void messageReceived(TidyMessage message)
{
// All JTidy messages should be considered as DEBUG messages since they're not causing any problem with XWiki
// per see. However if the code calling Tidy need to do something different based on the fact that the
// tidying generated errors or warnings, it should act on tidy.getParseErrors() or tidy.getParseWarnings().
this.logger.debug("[JTidy] line {} column {} - {}", message.getLine(), message.getColumn(),
message.getMessage());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment