ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject ant-ivy git commit: improve the xooki2asciidoc convertor
Date Sun, 15 Feb 2015 15:21:14 GMT
Repository: ant-ivy
Updated Branches:
  refs/heads/xooki2asciidoc b3d2c0cd6 -> 64b328d82


improve the xooki2asciidoc convertor

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/64b328d8
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/64b328d8
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/64b328d8

Branch: refs/heads/xooki2asciidoc
Commit: 64b328d822661bb3aa3d90356a9b5e3821b9ae1c
Parents: b3d2c0c
Author: Nicolas Lalevée <nicolas.lalevee@hibnet.org>
Authored: Sun Feb 15 16:20:14 2015 +0100
Committer: Nicolas Lalevée <nicolas.lalevee@hibnet.org>
Committed: Sun Feb 15 16:20:14 2015 +0100

----------------------------------------------------------------------
 asciidoc-template/document.html.slim |  12 +--
 doc/ivyfile/dependency.html          |   2 +-
 doc/osgi/eclipse-plugin.html         |   9 +-
 doc/osgi/standard-osgi.html          |   9 +-
 doc/osgi/target-platform.html        |   9 +-
 doc/style/color.css                  |   8 +-
 doc/style/style.css                  |  66 ++++++++++++-
 doc/xooki2asciidoc/xooki2asciidoc.js | 157 +++++++++++++++++++++++++++---
 8 files changed, 220 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/asciidoc-template/document.html.slim
----------------------------------------------------------------------
diff --git a/asciidoc-template/document.html.slim b/asciidoc-template/document.html.slim
index 81e99a8..6cdb6bd 100644
--- a/asciidoc-template/document.html.slim
+++ b/asciidoc-template/document.html.slim
@@ -51,14 +51,14 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
         tr
           td id="sidebar-left"
             div class="block block-book" id="block-book-0"
-            h2 Apache Ivy&#153;
-            div class="content"
-              = page.menu()
-              center
-                iframe src="http://www.apache.org/ads/buttonbar.html" style="border-width:0;"
frameborder="0" scrolling="no" width="135" height="265"
+                div class="sidebar-title" Apache Ivy&#153;
+                div class="content"
+                  = page.menu()
+                  center
+                    iframe src="http://www.apache.org/ads/buttonbar.html" style="border-width:0;"
frameborder="0" scrolling="no" width="135" height="265"
           td valign="top"
             div id="main"
-              h1 class="title" = page.title
+              h1 = page.title
               #content=content
       table id="footer-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0"
width="100%"
         tr

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/doc/ivyfile/dependency.html
----------------------------------------------------------------------
diff --git a/doc/ivyfile/dependency.html b/doc/ivyfile/dependency.html
index f223d07..e66b38c 100644
--- a/doc/ivyfile/dependency.html
+++ b/doc/ivyfile/dependency.html
@@ -111,7 +111,7 @@ Moreover, the mapping '*->@' is handled as a specific case with configuration
in
 
 The syntax is 
 <code>*[att=value]</code>
-where <em>att</em> is the name of the attribute shared by the configurations
of the group, and <em>value</em is the value for this attribute that configurations
must have to be part of the group. This is especially useful with extra attributes.
+where <em>att</em> is the name of the attribute shared by the configurations
of the group, and <em>value</em> is the value for this attribute that configurations
must have to be part of the group. This is especially useful with extra attributes.
 
 For instance, if you have:
 <code>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/doc/osgi/eclipse-plugin.html
----------------------------------------------------------------------
diff --git a/doc/osgi/eclipse-plugin.html b/doc/osgi/eclipse-plugin.html
index 28c59c4..fafb2b6 100644
--- a/doc/osgi/eclipse-plugin.html
+++ b/doc/osgi/eclipse-plugin.html
@@ -26,14 +26,9 @@
 <body>
 	<textarea id="xooki-source">
 
-<table class="notice">
-  <tr>
-    <td style="vertical-align: top"><img src="../images/warning.png" style="float:left;"
/></td>
-    <td>
+<div class="tip">
     Note that this feature is considered as <b>experimental</b>. It should work
with simple configuration but may not in complex ones. If you have any issue with that feature,
you are welcomed to come discussed your use case on the <a href="http://ant.apache.org/ivy/mailing-lists.html">ivy-user</a>
mailing list, or discuss about implementation issues or improvement you may have found on
<a href="http://ant.apache.org/ivy/mailing-lists.html">ant-dev</a>.
-    </td>
-  </tr>
-</table>
+</div>
 
 This page describes how to build an Eclipse&#153; plugin with Apache Ivy&#153; and
its OSGi&#153; capabilities.
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/doc/osgi/standard-osgi.html
----------------------------------------------------------------------
diff --git a/doc/osgi/standard-osgi.html b/doc/osgi/standard-osgi.html
index 81687b6..325353d 100644
--- a/doc/osgi/standard-osgi.html
+++ b/doc/osgi/standard-osgi.html
@@ -26,14 +26,9 @@
 <body>
 	<textarea id="xooki-source">
 
-<table class="notice">
-  <tr>
-    <td style="vertical-align: top"><img src="../images/warning.png" style="float:left;"
/></td>
-    <td>
+<div class="tip">
     Note that this feature is considered as <b>experimental</b>. It should work
with simple configuration but may not in complex ones. If you have any issue with that feature,
you are welcomed to come discussed your use case on the <a href="http://ant.apache.org/ivy/mailing-lists.html">ivy-user</a>
mailing list, or discuss about implementation issues or improvement you may have found on
<a href="http://ant.apache.org/ivy/mailing-lists.html">ant-dev</a>.
-    </td>
-  </tr>
-</table>
+</div>
 
 <hr />
 <center><b>TODO - WORK IN PROGRESS</b></center>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/doc/osgi/target-platform.html
----------------------------------------------------------------------
diff --git a/doc/osgi/target-platform.html b/doc/osgi/target-platform.html
index 1f64644..8c791e7 100644
--- a/doc/osgi/target-platform.html
+++ b/doc/osgi/target-platform.html
@@ -26,14 +26,9 @@
 <body>
 	<textarea id="xooki-source">
 
-<table class="notice">
-  <tr>
-    <td style="vertical-align: top"><img src="../images/warning.png" style="float:left;"
/></td>
-    <td>
+<div class="tip">
     Note that this feature is considered as <b>experimental</b>. It should work
with simple configuration but may not in complex ones. If you have any issue with that feature,
you are welcomed to come discussed your use case on the <a href="http://ant.apache.org/ivy/mailing-lists.html">ivy-user</a>
mailing list, or discuss about implementation issues or improvement you may have found on
<a href="http://ant.apache.org/ivy/mailing-lists.html">ant-dev</a>.
-    </td>
-  </tr>
-</table>
+</div>
 
 The concept of "target platform" is a concept introduced by Eclipse&#153; to describe
the set of bundle which will run together in an OSGi&#153; environement. Then when developping
an OSGi bundle, we expect it to run in a such "target platform".
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/doc/style/color.css
----------------------------------------------------------------------
diff --git a/doc/style/color.css b/doc/style/color.css
index 031c4f4..51333f7 100644
--- a/doc/style/color.css
+++ b/doc/style/color.css
@@ -28,11 +28,11 @@ body  {
 h1, h2, h3, h4, h5, h6, .toc-title {
   color: #7a9438;
 }
-h1 {
+h2 {
   color: #fff;
   background-color: #7a9438;
 }
-.title {
+h1 {
   color: #7a9438;
   background-color: #fff;
   background: none;
@@ -142,10 +142,6 @@ pre {
 	background: #9ebf47;
 }
 
-#content {
-  border-top: 3px solid #9ebf47;
-}
-
 #forum tr.dark {
   background: #daeddc;
 }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/doc/style/style.css
----------------------------------------------------------------------
diff --git a/doc/style/style.css b/doc/style/style.css
index 7308518..4524ed4 100644
--- a/doc/style/style.css
+++ b/doc/style/style.css
@@ -46,7 +46,7 @@ body, p, td, li, ul, ol  {
 h1, h2, h3, h4, h5, h6 {
   font-family: "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, Verdana, sans-serif;
 }
-h1 {
+h2 {
 /*
   margin-left: 15px;
   margin-right: 15px;
@@ -58,13 +58,13 @@ h1 {
   -moz-border-radius-bottomright: 5px;
   -moz-border-radius-bottomleft: 5px;
 }
-h2 {
+h3 {
   font-size: 1.4em;
 }
-h3 {
+h4 {
   font-size: 1.2em;
 }
-h4 {
+h5 {
   font-size: 1.1em;
 }
 tr.dark td, tr.light td {
@@ -160,6 +160,17 @@ pre {
 #sidebar-left li, #sidebar-right li {
   font-size: 1em;
 }
+.sidebar-title {
+  margin: 5px 0px 0px 0px;
+  padding: 1px 5px 1px 30px;
+  font-size: 1.2em;
+  font-weight: 700;
+  -moz-border-radius-topleft: 5px;
+  -moz-border-radius-topright: 5px;
+  color: #000;
+  background-color: #eee;
+  font-family: "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, Verdana, sans-serif;
+}
 #content {
   table-layout:fixed;
 }
@@ -312,3 +323,50 @@ tr.homeitems a:hover {
     background-color: #FCFCCA;
     margin: 10px;
 }
+
+table.tableblock {
+    border-collapse: collapse;
+    width: 90%;
+    margin: auto;
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+
+table.tableblock thead {
+	background-color: #DEE4CD;
+	border: 1px solid #7A9437;
+}
+
+table.tableblock th {
+	font-family: monospace;
+	border: 1px solid #7A9437;
+	padding: 5px;
+}
+
+table.tableblock tbody {
+    background-color: #FFFFFF;
+    border: 1px solid #7A9437;
+}
+
+table.tableblock td {
+    border: 1px dotted #7A9437;
+    padding: 5px;
+}
+
+table.tableblock td p:last-child {
+    margin: 0px;
+}
+
+.note {
+	margin: 10px 10px 10px 50px;
+	padding: 10px;
+	font-style: italic;
+	-moz-border-radius: 10px;
+	background-color: #F6FF7F;
+	border: 1px solid #FFB643;
+	color: #4E3000;
+}
+
+.note .title {
+	display:none;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/64b328d8/doc/xooki2asciidoc/xooki2asciidoc.js
----------------------------------------------------------------------
diff --git a/doc/xooki2asciidoc/xooki2asciidoc.js b/doc/xooki2asciidoc/xooki2asciidoc.js
index 8945c64..ab5840f 100644
--- a/doc/xooki2asciidoc/xooki2asciidoc.js
+++ b/doc/xooki2asciidoc/xooki2asciidoc.js
@@ -753,7 +753,6 @@ xooki.input = {
                 var title;
                 var url;
                 var invalid = false;
-                
                 if (typeof xooki.toc.pages[xooki.toc.importRoot + id] != "undefined") {
                	    title = xooki.toc.pages[xooki.toc.importRoot + id].title;
                     url = pu(xooki.toc.importRoot + id);
@@ -810,7 +809,7 @@ xooki.input = {
                     + "\n----\n\n";
                 input = input.substring(0, codeSection.outerStart)
                     + processedSection
-                    + input.substring(codeSection.outerEnd);
+                    + input.substring(codeSection.outerEnd).trim();
                 from = codeSection.outerStart + processedSection.length;
     
                 codeSection = xooki.string.findXmlSection(input, "code", from);
@@ -827,7 +826,8 @@ xooki.input = {
 		        result = result + input.slice(lastStart,nextPos);
 		        lastStart = nextPos;
 		        nextPos = input.indexOf(">]" , lastStart);
-		        result = result + xooki.url.loadURL(lu(input.slice(lastStart+2,nextPos)));
+		        result = result + "include::" + lu(input.slice(lastStart+2,nextPos)) + "[]"
+		        //result = result + xooki.url.loadURL(lu(input.slice(lastStart+2,nextPos)));
 		        lastStart = nextPos + 2;
 		        nextPos = input.indexOf("[<" , lastStart);
 	        }
@@ -853,10 +853,20 @@ xooki.input = {
 		},
 
 		htmltags: function(input) {
-		    print('search href\n')
-            var s = xooki.string.findSection(input, new RegExp('<a\\s*href\\s*=\\s*\\"([^\\"]*)\\"[^>]*>'),
new RegExp('</a>'));
+            print('search comment\n')
+            var s = xooki.string.findSection(input, new RegExp('<!--'), new RegExp('-->'));
             var from = 0;
             while (s != null) {
+                processedSection = "\n////\n" + input.substring(s.innerStart, s.innerEnd)
+ "\n////\n";
+                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+                s = xooki.string.findSection(input, new RegExp('<!--'), new RegExp('-->'),
from);
+            }
+		    
+		    print('search href\n')
+            s = xooki.string.findSection(input, new RegExp('<a\\s*href\\s*=\\s*\\"([^\\"]*)\\"[^>]*>'),
new RegExp('</a>'));
+            from = 0;
+            while (s != null) {
                 var href = s.matcherStart[1];
                 processedSection = "link:" + href + "[" + input.substring(s.innerStart, s.innerEnd)
+ "]";
                 input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
@@ -875,6 +885,36 @@ xooki.input = {
                 s = xooki.string.findSection(input, new RegExp('<a\\s*name\\s*=\\s*\\"([^\\"]*)\\"[^>]*>'),
new RegExp('</a>'), from);
             }
 
+            print('search tip\n')
+            s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*"tip"[^>]*>'),
new RegExp('</div>'));
+            from = 0;
+            while (s != null) {
+                processedSection = "\n[NOTE]\n====\n" + input.substring(s.innerStart, s.innerEnd)
+ "\n====\n";
+                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+                s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*"tip"[^>]*>'),
new RegExp('</div>'), from);
+            }
+
+            print('search step\n')
+            s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*"step"[^>]*>'),
new RegExp('</div>'));
+            from = 0;
+            while (s != null) {
+                processedSection = input.substring(s.innerStart, s.innerEnd);
+                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+                s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*"step"[^>]*>'),
new RegExp('</div>'), from);
+            }
+
+            print('search shell\n')
+            s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*"shell"[^>]*>'),
new RegExp('</div>'));
+            from = 0;
+            while (s != null) {
+                processedSection = input.substring(s.innerStart, s.innerEnd);
+                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+                s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*"shell"[^>]*>'),
new RegExp('</div>'), from);
+            }
+
             print('search img\n')
             s = xooki.string.find(input, new RegExp('<img\\s*src\\s*=\\s*\\"([^\\"]*)\\"\\s*/>'));
             from = 0;
@@ -888,7 +928,7 @@ xooki.input = {
             }
 
             print('search br\n')
-            s = xooki.string.find(input, new RegExp('<br\\s*/>'));
+            s = xooki.string.find(input, new RegExp('<br\\s*/?>'));
             from = 0;
             while (s != null) {
                 processedSection = "\n"
@@ -896,7 +936,19 @@ xooki.input = {
                     + processedSection
                     + input.substring(s.end);
                 from = s.begin + processedSection.length;
-                s = xooki.string.find(input, new RegExp('<br\\s*/>'), from);
+                s = xooki.string.find(input, new RegExp('<br\\s*/?>'), from);
+            }
+
+            print('search hr\n')
+            s = xooki.string.find(input, new RegExp('<hr\\s*/>'));
+            from = 0;
+            while (s != null) {
+                processedSection = "\n'''\n"
+                input = input.substring(0, s.begin)
+                    + processedSection
+                    + input.substring(s.end);
+                from = s.begin + processedSection.length;
+                s = xooki.string.find(input, new RegExp('<hr\\s*/>'), from);
             }
 
             print('search b\n')
@@ -911,6 +963,18 @@ xooki.input = {
                 print("found=" + (s != null) + "\n")
             }
 
+            print('search u\n')
+            s = xooki.string.findXmlSection(input, "u");
+            from = 0;
+            print("found=" + (s != null) + "\n")
+            while (s != null) {
+                processedSection = input.substring(s.innerStart, s.innerEnd);
+                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+                s = xooki.string.findXmlSection(input, "u", from);
+                print("found=" + (s != null) + "\n")
+            }
+
             print('search strong\n')
             s = xooki.string.findXmlSection(input, "strong");
             from = 0;
@@ -1014,11 +1078,26 @@ xooki.input = {
                 s = xooki.string.findXmlSection(input, "tt", from);
             }
 
+            print('search pre\n')
+            s = xooki.string.findXmlSection(input, "pre");
+            from = 0;
+            while (s != null) {
+                processedSection = "\n[source]\n----\n" 
+                    + input.substring(s.innerStart, s.innerEnd)
+                    + "\n----\n\n";
+                input = input.substring(0, s.outerStart)
+                    + processedSection
+                    + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+    
+                s = xooki.string.findXmlSection(input, "pre", from);
+            }
+
             print('search em\n')
             s = xooki.string.findXmlSection(input, "em");
             from = 0;
             while (s != null) {
-                processedSection = "\n[NOTE]\n===============================\n" + input.substring(s.innerStart,
s.innerEnd) + "\n===============================\n";
+                processedSection = "_" + input.substring(s.innerStart, s.innerEnd) + "_";
                 input = input.substring(0, s.outerStart)
                     + processedSection
                     + input.substring(s.outerEnd);
@@ -1027,6 +1106,16 @@ xooki.input = {
                 s = xooki.string.findXmlSection(input, "em", from);
             }
 
+            print('search div-since\n')
+            s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*\\"\\s*since\\s*\\"[^>]*>'),
new RegExp('</div>'));
+            from = 0;
+            while (s != null) {
+                processedSection = "*__" + input.substring(s.innerStart, s.innerEnd) + "__*";
+                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+                s = xooki.string.findSection(input, new RegExp('<div\\s*class\\s*=\\s*\\"\\s*since\\s*\\"[^>]*>'),
new RegExp('</div>'), from);
+            }
+
             print('search span-since\n')
             s = xooki.string.findSection(input, new RegExp('<span\\s*class\\s*=\\s*\\"\\s*since\\s*\\"[^>]*>'),
new RegExp('</span>'));
             from = 0;
@@ -1037,6 +1126,16 @@ xooki.input = {
                 s = xooki.string.findSection(input, new RegExp('<span\\s*class\\s*=\\s*\\"\\s*since\\s*\\"[^>]*>'),
new RegExp('</span>'), from);
             }
 
+            print('search span-tagdoc\n')
+            s = xooki.string.findSection(input, new RegExp('<span\\s*class\\s*=\\s*\\"\\s*tagdoc\\s*\\"[^>]*>'),
new RegExp('</span>'));
+            from = 0;
+            while (s != null) {
+                processedSection = input.substring(s.innerStart, s.innerEnd);
+                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+                from = s.outerStart + processedSection.length;
+                s = xooki.string.findSection(input, new RegExp('<span\\s*class\\s*=\\s*\\"\\s*tagdoc\\s*\\"[^>]*>'),
new RegExp('</span>'), from);
+            }
+
             print('search ul/ol\n')
             var htmllisttag = function(input, from, indent) {
                 var sul = xooki.string.find(input, '<ul>', from);
@@ -1067,10 +1166,12 @@ xooki.input = {
                         break;
                     }
                     start = sli.outerStart;
+                    var betweenliContent = "";
                     if (!first) {
                         start = lastEnd;
+                        betweenliContent = input.substring(lastEnd, sli.outerStart);
                     }
-                    processedSection = "\n" + innerindent + input.substring(sli.innerStart,
sli.innerEnd).replace(/\\s/, ' ');
+                    processedSection = betweenliContent + "\n" + innerindent + input.substring(sli.innerStart,
sli.innerEnd).replace(/\\s/, ' ');
                     input = input.substring(0, start)
                         + processedSection
                         + input.substring(sli.outerEnd);
@@ -1097,7 +1198,12 @@ xooki.input = {
             print("found=" + (s != null) + "\n")
             while (s != null) {
                 tableContent = input.substring(s.innerStart, s.innerEnd);
-                processedSection = "\n"
+                var tablespec = ""
+                processedSection = ""
+
+                var ivyTable = input.substring(s.outerStart, s.innerStart).indexOf("class=\"ivy-attributes\"")
> -1;
+                ivyTable = ivyTable || input.substring(s.outerStart, s.innerStart).indexOf("class=\"ant\"")
> -1;
+                var nbCol = 0;
 
                 print('search tablehead\n')
                 s2 = xooki.string.findXmlSection(tableContent, "thead");
@@ -1105,15 +1211,18 @@ xooki.input = {
                 print("found=" + (s2 != null) + "\n")
                 if (s2 != null) {
                     tableHead = tableContent.substring(s2.innerStart, s2.innerEnd);
-                    processedSection += '[options="header"]\n'
+                    tablespec = "options=\"header\""
                     processedSection += '|=======\n'
 
                     print('search th\n')
                     s3 = xooki.string.findXmlSection(tableHead, "th");
+                    var nbTh = 0;
                     while (s3 != null) {
                         processedSection += "|" + tableHead.substring(s3.innerStart, s3.innerEnd);
                         s3 = xooki.string.findXmlSection(tableHead, "th", s3.outerEnd);
+                        nbTh++;
                     }
+                    nbCol = Math.max(nbTh, nbCol);
                     processedSection += "\n"
                     from2 = s2.outerEnd
                 } else {
@@ -1127,19 +1236,39 @@ xooki.input = {
 
                     print('search td\n')
                     s3 = xooki.string.findXmlSection(trContent, "td");
+                    var nbTd = 0;
                     while (s3 != null) {
                         processedSection += "|" + trContent.substring(s3.innerStart, s3.innerEnd);
                         s3 = xooki.string.findXmlSection(trContent, "td", s3.outerEnd);
+                        nbTd++;
                     }
                     processedSection += "\n"
+                    nbCol = Math.max(nbTd, nbCol);
                     
                     from2 = s2.outerEnd;
                     s2 = xooki.string.findXmlSection(tableContent, "tr", from2);
                 }
 
                 processedSection += '|=======\n'
-                
-                input = input.substring(0, s.outerStart) + processedSection + input.substring(s.outerEnd);
+
+                if (ivyTable) {
+                    if (tablespec.length != 0) {
+                        tablespec += ","
+                    }
+                    tablespec += "cols=\""
+                    for (var i = 0; i < nbCol; i++) {
+                        if (i == 0) {
+                            tablespec += "15%";
+                        } else if (i == 1) {
+                            tablespec += ",50%";
+                        } else {
+                            tablespec += "," + Math.round(35 / (nbCol - 2)) + "%";
+                        }
+                    }
+                    tablespec += "\""
+                }
+                    
+                input = input.substring(0, s.outerStart) + '\n[' + tablespec + ']\n' + processedSection
+ input.substring(s.outerEnd);
                 from = s.outerStart + processedSection.length;
                 s = xooki.string.findXmlSection(input, "table", from);
                 print("found=" + (s != null) + "\n")
@@ -1408,7 +1537,7 @@ xooki.init = function() {
     xooki.template.source = xooki.url.loadURL(xooki.c.action == "print"?cu("printTemplate"):cu("template"));
 	if(xooki.template.source != null) {
         xooki.template.head = '';
-		xooki.template.body = '${title}\n====================\n\n${body}';		
+		xooki.template.body = '${body}';		
 	}
 	
 


Mime
View raw message