grunt-ngdocs
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -0,1 +1,20 @@ | ||
# 0.2.6 (2014-10-27) | ||
## Features | ||
### ngdocs | ||
* parse all given files #58 #71 ([793d797d](https://github.com/m7r/grunt-ngdocs/commit/793d797d)) | ||
## Bug fixes | ||
### ngdocs | ||
* update marked #112 ([1e64893f](https://github.com/m7r/grunt-ngdocs/commit/1e64893f)) | ||
* remove douple ids from headings ([485408a3](https://github.com/m7r/grunt-ngdocs/commit/485408a3)) | ||
# 0.2.5 (2014-09-17) | ||
@@ -2,0 +21,0 @@ |
{ | ||
"name": "grunt-ngdocs", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "grunt plugin for angularjs documentation", | ||
@@ -20,3 +20,3 @@ "main": "tasks", | ||
"dependencies": { | ||
"marked": "0.2.9" | ||
"marked": "~0.3.2" | ||
}, | ||
@@ -23,0 +23,0 @@ "peerDependencies": { |
@@ -226,7 +226,7 @@ var ngdoc = require('../src/ngdoc.js'); | ||
' fifth line')). | ||
toMatch('<p>first line\n' + | ||
toMatch('<div class="docs-page"><p>first line\n' + | ||
'second line</p>\n' + | ||
'<pre><code>third line\n' + | ||
' fourth line</code></pre>\n' + | ||
'<p>fifth line</p>\n'); | ||
' fourth line\n' + | ||
'</code></pre><p>fifth line</p>\n'); | ||
}); | ||
@@ -243,4 +243,4 @@ | ||
'third line\n' + | ||
' fourth line</code></pre>\n' + | ||
'<p>fifth line</p>\n</div>'); | ||
' fourth line\n' + | ||
'</code></pre><p>fifth line</p>\n</div>'); | ||
}); | ||
@@ -247,0 +247,0 @@ |
@@ -13,3 +13,14 @@ /** | ||
var marked = require('marked'); | ||
var renderer = new marked.Renderer(); | ||
renderer.heading = function (text, level) { | ||
return '<h' + | ||
level + | ||
'>' + | ||
text + | ||
'</h' + | ||
level + | ||
'>\n'; | ||
}; | ||
marked.setOptions({ | ||
renderer: renderer, | ||
gfm: true, | ||
@@ -1140,3 +1151,3 @@ tables: true | ||
'ie', | ||
'migration', | ||
'migration' | ||
]; | ||
@@ -1143,0 +1154,0 @@ |
@@ -12,9 +12,9 @@ /** | ||
function process(content, file, section, options) { | ||
if (/\.js$/.test(file)) { | ||
if (file.match(/\.ngdoc$/)) { | ||
var header = '@section ' + section + '\n'; | ||
exports.docs.push(new ngdoc.Doc(header + content.toString(),file, 1, options).parse()); | ||
} else { | ||
processJsFile(content, file, section, options).forEach(function(doc) { | ||
exports.docs.push(doc); | ||
}); | ||
} else if (file.match(/\.ngdoc$/)) { | ||
var header = '@section ' + section + '\n'; | ||
exports.docs.push(new ngdoc.Doc(header + content.toString(),file, 1, options).parse()); | ||
} | ||
@@ -21,0 +21,0 @@ } |
857371
13276
+ Addedmarked@0.3.19(transitive)
- Removedmarked@0.2.9(transitive)
Updatedmarked@~0.3.2