From 507bee048ff879e46c01eeae49bcb10ac1379c7b Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 24 Nov 2016 18:18:54 +0100 Subject: [PATCH 1/2] Flatten to ul/ol types, refs the-grid/ed#300 --- index.coffee | 3 ++- spec/Flatten.coffee | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.coffee b/index.coffee index 5e7a4e8..986f837 100644 --- a/index.coffee +++ b/index.coffee @@ -342,8 +342,9 @@ module.exports = class Flatten type: 'code' html: @tagToHtml tag, id when 'ul', 'ol', 'dl' + type = if tag.name in ['ul', 'ol'] then tag.name else 'list' results.push - type: 'list' + type: type html: @tagToHtml tag, id when 'blockquote' results.push diff --git a/spec/Flatten.coffee b/spec/Flatten.coffee index 36ffbf0..5123ffa 100644 --- a/spec/Flatten.coffee +++ b/spec/Flatten.coffee @@ -393,7 +393,7 @@ describe 'Flatten', -> items: [ id: '6010f3ac-63f2-4407-a65d-9d6b7e9a40f2' content: [ - type: 'list' + type: 'ul' html: '' ] ] @@ -429,7 +429,7 @@ describe 'Flatten', -> items: [ id: '6010f3ac-63f2-4407-a65d-9d6b7e9a40f2' content: [ - type: 'list' + type: 'ul' html: '' ] ] @@ -469,7 +469,7 @@ describe 'Flatten', -> items: [ id: '6010f3ac-63f2-4407-a65d-9d6b7e9a40f2' content: [ - type: 'list' + type: 'ul' html: '' ] ] @@ -575,7 +575,7 @@ describe 'Flatten', -> html: "

three
four

" text: 'three four' , - type: 'list' + type: 'ul' html: "" , type: 'text' From 07f3e1f7aee8b357db3e9024aeb1fe90aaaa3465 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Mon, 28 Nov 2016 13:11:25 +0100 Subject: [PATCH 2/2] Bump apidocs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e309d3b..3b28c24 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "grunt-mocha-phantomjs": "^4.0.0", "grunt-mocha-test": "^0.13.2", "mocha": "^3.1.2", - "thegrid-apidocs": "^0.1.19", + "thegrid-apidocs": "^0.1.23", "tv4": "^1.2.7" } }