Skip to content

Safe addition of markdown quotes around a string (bold, emphasis, code)

Notifications You must be signed in to change notification settings

bahmutov/quote-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quote-markdown

Safe addition of markdown quotes around a string (bold, emphasis, code)

NPM info

npm install quote --save

Use

var quote = require('quote-markdown');
quote.string('foo'); // "foo"
quote.code('foo'); // `foo`
quote.code(quote.code('foo')); // `foo`
quote.em('foo'); // *foo*
quote.bold('foo'); // **foo**

Built on top of quote, great for use with debug-logdown

var log = require('debug-logdown')('user');
var quote = require('quote-markdown');
log.info('user', quote.em(username), 'logged in at', quote.bold(new Date()));

Author: Gleb Bahmutov © 2014 @bahmutov glebbahmutov.com

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet / open issue on Github

About

Safe addition of markdown quotes around a string (bold, emphasis, code)

Resources

Stars

Watchers

Forks

Packages

No packages published