3.0.0 • Published 7 years ago

remark-comment-blocks v3.0.0

Weekly downloads
25
License
MIT
Repository
github
Last release
7 years ago

remark-comment-blocks Build Status NPM version Dependency Status

Wrap Markdown with a comment block.

Install

With npm do:

npm install remark-comment-blocks

Example

var remark = require('remark');
var comments = require('remark-comment-blocks');

var markdown = 'Hello, world!';
var result = remark.use(comments).processSync(markdown);
console.log(result);

Output:

/**
 * Hello, world!
 */

API

remark.use(comments, options)

options

start

Type: string Default: /**\n

This string is used to begin the comment block.

middle

Type: string Default: *

This string is prepended to each line, other than the start and end lines.

end

Type: string Default: \n */\n

This string is used to end the comment block. Note that this must include a trailing newline.

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs