summarize-markdown
Advanced tools
Comparing version 0.2.0 to 0.2.1
"use strict"; | ||
var ent = require('ent'); | ||
var marked = require('marked'); | ||
@@ -8,2 +9,3 @@ var renderer = new marked.Renderer(); | ||
renderer.blockquote = function(quote) { | ||
quote = ent.decode(quote); | ||
return '"' + quote.trim() + '" '; | ||
@@ -13,2 +15,3 @@ }; | ||
renderer.heading = function(text, level) { | ||
text = ent.decode(text); | ||
return text + ': '; | ||
@@ -21,2 +24,3 @@ }; | ||
renderer.listitem = function(text) { | ||
text = ent.decode(text); | ||
if (/\.\s*$/.test(text)) { | ||
@@ -31,2 +35,3 @@ return text; | ||
renderer.paragraph = function(text) { | ||
text = ent.decode(text); | ||
return text + ' '; | ||
@@ -33,0 +38,0 @@ }; |
{ | ||
"name": "summarize-markdown", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Summarize markdown into a simple text string", | ||
@@ -24,2 +24,3 @@ "author": { | ||
"dependencies": { | ||
"ent": "~0.1.0", | ||
"marked": "~0.3" | ||
@@ -26,0 +27,0 @@ }, |
@@ -5,2 +5,4 @@ # Markdown Summarizer | ||
[![Build Status](https://travis-ci.org/bryanburgers/summarize-markdown.png?branch=master)](https://travis-ci.org/bryanburgers/summarize-markdown) | ||
## Why? | ||
@@ -7,0 +9,0 @@ |
@@ -62,2 +62,7 @@ var assert = require('assert'); | ||
}); | ||
it('doesn\'t make entities of quotes', function() { | ||
t('It\'s complicated.', 'It\'s complicated.'); | ||
t('**It\'s** complicated.', 'It\'s complicated.'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33118
106
35
0
2
+ Addedent@~0.1.0
+ Addedent@0.1.0(transitive)