You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2018/05/17 15:55:40 UTC
svn commit: r1831793 - in /cxf/web: pom.xml
src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java
Author: dkulp
Date: Thu May 17 15:55:40 2018
New Revision: 1831793
URL: http://svn.apache.org/viewvc?rev=1831793&view=rev
Log:
Update to translate new style code macro HTML to the SyntaxHighlighter format
Modified:
cxf/web/pom.xml
cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java
Modified: cxf/web/pom.xml
URL: http://svn.apache.org/viewvc/cxf/web/pom.xml?rev=1831793&r1=1831792&r2=1831793&view=diff
==============================================================================
--- cxf/web/pom.xml (original)
+++ cxf/web/pom.xml Thu May 17 15:55:40 2018
@@ -28,12 +28,12 @@
<parent>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-parent</artifactId>
- <version>3.1.13</version>
+ <version>3.1.15</version>
</parent>
<properties>
<enforcer.skip>true</enforcer.skip>
- <cxf.version>3.1.13</cxf.version>
+ <cxf.version>3.1.15</cxf.version>
<extra.arg></extra.arg>
<svn.arg1></svn.arg1>
<svn.arg2></svn.arg2>
Modified: cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java
URL: http://svn.apache.org/viewvc/cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java?rev=1831793&r1=1831792&r2=1831793&view=diff
==============================================================================
--- cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java (original)
+++ cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java Thu May 17 15:55:40 2018
@@ -299,6 +299,17 @@ public class ConfluenceCleanupWriter ext
if (value != null && value.startsWith("/confluence/")) {
newAtts.addMapping("value", SiteExporter.ROOT + value.substring(11));
}
+ } else if ("pre".equals(localName.toLowerCase())
+ || "pre".equals(qName.toLowerCase())) {
+ String cls = atts.getValue("class");
+ if ("syntaxhighlighter-pre".equalsIgnoreCase(cls)) {
+ String brush = atts.getValue("data-syntaxhighlighter-params");
+ if (brush.toLowerCase().startsWith("brush")) {
+ newAtts.remove("data-syntaxhighlighter-params");
+ newAtts.remove("data-theme");
+ newAtts.addMapping("class", brush);
+ }
+ }
}
super.startElement(uri, localName, qName, newAtts);
}