geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r515618 - /geronimo/sandbox/hokeypokey/trunk/src/main/groovy/hokeypokey/commands/exportspace.groovy
Date Wed, 07 Mar 2007 15:54:11 GMT
Author: jdillon
Date: Wed Mar  7 07:54:10 2007
New Revision: 515618

URL: http://svn.apache.org/viewvc?view=rev&rev=515618
Log:
Hack in rewriting of confluence/images links

Modified:
    geronimo/sandbox/hokeypokey/trunk/src/main/groovy/hokeypokey/commands/exportspace.groovy

Modified: geronimo/sandbox/hokeypokey/trunk/src/main/groovy/hokeypokey/commands/exportspace.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/hokeypokey/trunk/src/main/groovy/hokeypokey/commands/exportspace.groovy?view=diff&rev=515618&r1=515617&r2=515618
==============================================================================
--- geronimo/sandbox/hokeypokey/trunk/src/main/groovy/hokeypokey/commands/exportspace.groovy
(original)
+++ geronimo/sandbox/hokeypokey/trunk/src/main/groovy/hokeypokey/commands/exportspace.groovy
Wed Mar  7 07:54:10 2007
@@ -77,9 +77,7 @@
             
             def exporter = new SpaceExporter(client, engine)
             
-            //
-            // HACK: Hook up a filter to translate links for this space
-            //
+            // Hook up a filter to translate links for this space
             exporter.filters << new RegexSearchReplaceFilter(
                 '"' + "/confluence/display/$space/(.*?)" + '"',
                 { matcher, ctx ->
@@ -93,9 +91,14 @@
                     return '"' + href + '"'
                 })
             
-            //
-            // HACK: Add a filter to warn about /confluence URLS
-            //
+            // Translate confluence images to G images
+            exporter.filters << new RegexSearchReplaceFilter(
+                '"' + "/confluence/images/(.*?)" + '"',
+                { matcher, ctx ->
+                    return '"' + "http://geronimo.apache.org/images/" + matcher.group(1)
+ '"'
+                })
+            
+            // Add a filter to warn about /confluence URLS
             exporter.filters << new RegexWarnFilter('"/confluence/.*?"')
             
             exporter.export(space)



Mime
View raw message