summarize-markdown
Advanced tools
Comparing version 0.2.1 to 0.2.2
11
index.js
@@ -7,3 +7,5 @@ "use strict"; | ||
//code(string code, string language) | ||
renderer.code = function(code, language) { | ||
return ''; | ||
}; | ||
renderer.blockquote = function(quote) { | ||
@@ -33,2 +35,5 @@ quote = ent.decode(quote); | ||
renderer.paragraph = function(text) { | ||
if (text === '') { | ||
return ''; | ||
} | ||
text = ent.decode(text); | ||
@@ -55,3 +60,5 @@ return text + ' '; | ||
}; | ||
//image(string href, string title, string text) | ||
renderer.image = function(href, title, text) { | ||
return ''; | ||
}; | ||
@@ -58,0 +65,0 @@ module.exports = function(text, options) { |
{ | ||
"name": "summarize-markdown", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Summarize markdown into a simple text string", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -67,2 +67,10 @@ var assert = require('assert'); | ||
}); | ||
it('ignores images', function() { | ||
t('First content.\r\n\r\n![Alt](/assets/images/image.png)\r\n\r\nSome other content.', 'First content. Some other content.'); | ||
}); | ||
it('ignores code', function() { | ||
t('First content.\r\n\r\n```js\r\nvar x = 3;\r\nvar y = 4;\r\n```\r\n\r\nSome other content.', 'First content. Some other content.'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33594
119