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/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" } } 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: '<ul><li>Hello world<ul><li>Foo</li></ul></li><li>Foo bar</li></ul>' ] ] @@ -429,7 +429,7 @@ describe 'Flatten', -> items: [ id: '6010f3ac-63f2-4407-a65d-9d6b7e9a40f2' content: [ - type: 'list' + type: 'ul' html: '<ul><li>Hello world<ul><li>Foo</li></ul></li><li>Foo bar</li></ul>' ] ] @@ -469,7 +469,7 @@ describe 'Flatten', -> items: [ id: '6010f3ac-63f2-4407-a65d-9d6b7e9a40f2' content: [ - type: 'list' + type: 'ul' html: '<ul><li>Hello world<ul><li>Foo</li></ul></li><li>Foo bar</li></ul>' ] ] @@ -575,7 +575,7 @@ describe 'Flatten', -> html: "<p>three<br>four</p>" text: 'three four' , - type: 'list' + type: 'ul' html: "<ul><li>br at end</li></ul>" , type: 'text'