sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1705083 [1/5] - in /sis: branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/ site/trunk/book/en/ site/trunk/book/fr/
Date Thu, 24 Sep 2015 15:40:39 GMT
Author: desruisseaux
Date: Thu Sep 24 15:40:39 2015
New Revision: 1705083

URL: http://svn.apache.org/viewvc?rev=1705083&view=rev
Log:
Ported the developer guide GeoAPI section.

Added:
    sis/site/trunk/book/en/geoapi.html   (contents, props changed)
      - copied, changed from r1678141, sis/site/trunk/content/book/en/developer-guide.html
    sis/site/trunk/book/fr/geoapi.html   (contents, props changed)
      - copied, changed from r1678141, sis/site/trunk/content/book/fr/developer-guide.html
Modified:
    sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
    sis/site/trunk/book/en/body.html
    sis/site/trunk/book/fr/body.html
    sis/site/trunk/book/fr/introduction.html   (props changed)

Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java?rev=1705083&r1=1705082&r2=1705083&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
[UTF-8] Thu Sep 24 15:40:39 2015
@@ -155,26 +155,34 @@ public final class Assembler {
      * the right amount of spaces for the location where it is introduced.
      */
     private void removeIndentation(final Node node) {
-        if (node.getNodeType() == Node.TEXT_NODE) {
-            boolean       newLine = false;
-            StringBuilder buffer  = null;
-            CharSequence  text    = node.getTextContent();
-            for (int i=0; i<text.length(); i++) {
-                switch (text.charAt(i)) {
-                    case '\r': break;  // Delete all occurrences of '\r'.
-                    case '\n': newLine = true;  continue;
-                    default  : newLine = false; continue;
-                    case ' ' : if (newLine) break; else continue;
+        switch (node.getNodeType()) {
+            case Node.ELEMENT_NODE: {
+                if ("pre".equals(node.getNodeName())) {
+                    return;
                 }
-                if (buffer == null) {
-                    text = buffer = new StringBuilder(text);
-                }
-                buffer.deleteCharAt(i--);
+                break;
             }
-            if (buffer != null) {
-                node.setNodeValue(buffer.toString());
+            case Node.TEXT_NODE: {
+                boolean       newLine = false;
+                StringBuilder buffer  = null;
+                CharSequence  text    = node.getTextContent();
+                for (int i=0; i<text.length(); i++) {
+                    switch (text.charAt(i)) {
+                        case '\r': break;  // Delete all occurrences of '\r'.
+                        case '\n': newLine = true;  continue;
+                        default  : newLine = false; continue;
+                        case ' ' : if (newLine) break; else continue;
+                    }
+                    if (buffer == null) {
+                        text = buffer = new StringBuilder(text);
+                    }
+                    buffer.deleteCharAt(i--);
+                }
+                if (buffer != null) {
+                    node.setNodeValue(buffer.toString());
+                }
+                return;
             }
-            return;
         }
         final NodeList children = node.getChildNodes();
         final int length = children.getLength();

Modified: sis/site/trunk/book/en/body.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/book/en/body.html?rev=1705083&r1=1705082&r2=1705083&view=diff
==============================================================================
--- sis/site/trunk/book/en/body.html (original)
+++ sis/site/trunk/book/en/body.html Thu Sep 24 15:40:39 2015
@@ -43,6 +43,7 @@
 
     <main>
       <xi:include href="introduction.html"/>
+      <xi:include href="geoapi.html"/>
     </main>
   </body>
 </html>



Mime
View raw message