blockquote.js 345 B

123456789101112131415161718
  1. 'use strict';
  2. module.exports = blockquote;
  3. function blockquote(node) {
  4. var values = this.block(node).split('\n');
  5. var result = [];
  6. var length = values.length;
  7. var index = -1;
  8. var value;
  9. while (++index < length) {
  10. value = values[index];
  11. result[index] = (value ? ' ' : '') + value;
  12. }
  13. return '>' + result.join('\n>');
  14. }