remark-comment-blocks

3.0.0 • Public • Published

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

Package Sidebar

Install

npm i remark-comment-blocks

Weekly Downloads

2

Version

3.0.0

License

MIT

Last publish

Collaborators

  • remcohaszing
  • johno
  • wooorm