mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 20:18:25 +02:00
* Quote builder even more functional :)
This commit is contained in:
parent
4cba6f4c10
commit
20fb54422a
5 changed files with 34 additions and 14 deletions
|
@ -245,6 +245,8 @@ Message.prototype.persist = function(cb) {
|
|||
};
|
||||
|
||||
Message.prototype.getQuoteLines = function(width) {
|
||||
// :TODO: options.maxBlankLines = 1
|
||||
|
||||
var quoteLines = [];
|
||||
|
||||
var origLines = this.message
|
||||
|
@ -257,13 +259,10 @@ Message.prototype.getQuoteLines = function(width) {
|
|||
tabWidth : 4,
|
||||
};
|
||||
|
||||
var wrapped;
|
||||
var quotePrefix = 'Nu> '; // :TODO: build FTN style quote prefix
|
||||
|
||||
for(var i = 0; i < origLines.length; ++i) {
|
||||
wrapped = wordWrapText(quotePrefix + origLines[i], wrapOpts).wrapped;
|
||||
|
||||
Array.prototype.push.apply(quoteLines, wrapped);
|
||||
Array.prototype.push.apply(quoteLines, wordWrapText(quotePrefix + origLines[i], wrapOpts).wrapped);
|
||||
}
|
||||
|
||||
return quoteLines;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue