You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
425 B
23 lines
425 B
'use strict'
|
|
|
|
module.exports = blockquote
|
|
|
|
var lineFeed = '\n'
|
|
var space = ' '
|
|
var greaterThan = '>'
|
|
|
|
function blockquote(node) {
|
|
var values = this.block(node).split(lineFeed)
|
|
var result = []
|
|
var length = values.length
|
|
var index = -1
|
|
var value
|
|
|
|
while (++index < length) {
|
|
value = values[index]
|
|
result[index] = (value ? space : '') + value
|
|
}
|
|
|
|
return greaterThan + result.join(lineFeed + greaterThan)
|
|
}
|