From 8a678578831a384c49002dca46c11b03b6b301cc Mon Sep 17 00:00:00 2001
From: Lars Trieloff <trieloff@adobe.com>
Date: Thu, 14 Dec 2017 15:36:13 +0000
Subject: [PATCH] [trivial] nested array formatting

---
 examples/docs/arrays.schema.md | 20 ++++++++------------
 templates/md/array-type.ejs    |  7 +++----
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/examples/docs/arrays.schema.md b/examples/docs/arrays.schema.md
index 7cccea8..f7dd628 100644
--- a/examples/docs/arrays.schema.md
+++ b/examples/docs/arrays.schema.md
@@ -39,7 +39,7 @@ This is an array
 ### list Type
 
 
-Array type: `string[]`.
+Array type: `string[]`
 
 All items must be of the type:
 `string`
@@ -64,12 +64,10 @@ This is an array of arrays
 ### listlist Type
 
 
-Array type: `array[]`.
+Array type: `array[]`
 
 All items must be of the type:
-Nesting alarm!
-
-Array type: `array`.
+Array type: `array`
 
 
 
@@ -90,12 +88,10 @@ This is an array of arrays of strings
 ### stringlistlist Type
 
 
-Array type: `string[][]`.
+Array type: `string[][]`
 
 All items must be of the type:
-Nesting alarm!
-
-Array type: `string[]`.
+Array type: `string[]`
 
 All items must be of the type:
 `string`
@@ -122,7 +118,7 @@ This is an array
 ### intlist Type
 
 
-Array type: `integer[]`.
+Array type: `integer[]`
 
 All items must be of the type:
 `integer`
@@ -147,7 +143,7 @@ This is an array
 ### boollist Type
 
 
-Array type: `boolean[]`.
+Array type: `boolean[]`
 
 All items must be of the type:
 `boolean`
@@ -170,7 +166,7 @@ This is an array
 ### numlist Type
 
 
-Array type: `number[]`.
+Array type: `number[]`
 
 All items must be of the type:
 `number`
diff --git a/templates/md/array-type.ejs b/templates/md/array-type.ejs
index b544dfa..76f74d7 100644
--- a/templates/md/array-type.ejs
+++ b/templates/md/array-type.ejs
@@ -5,7 +5,7 @@
  * of the License at http://www.apache.org/licenses/LICENSE-2.0
  */ %>
 
-Array type: <%=schema.simpletype %>.
+Array type: <%=schema.simpletype %>
 <% if (schema.items!==undefined) { %>
 
 All items must be of the type:<% 
@@ -15,9 +15,8 @@ if (schema.items.type==="string") {
   %><%- include("number-type",{schema:schema.items,_:_})
   %><% } else if (schema.items.type==="boolean") {
   %><%- include("boolean-type",{schema:schema.items,_:_}) 
-  %><% } else if (schema.items.type==="array") { %>
-Nesting alarm!
-<%- include("array-type",{schema:schema.items,_:_}) %>
+  %><% } else if (schema.items.type==="array") { 
+  %><%- include("array-type",{schema:schema.items,_:_}) %>
 <% } else { %>
 Unknown type `<%= schema.type %>`.
 
-- 
GitLab