Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
utf8mb4
Commit Description:
utf8mb4
/*!
* word-wrap <https://github.com/jonschlinkert/word-wrap>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
module . exports = function ( str , options ) {
options = options || {};
if ( str == null ) {
return str ;
}
var width = options . width || 50 ;
var indent = ( typeof options . indent === 'string' )
? options . indent
: ' ' ;
var newline = options . newline || '\n' + indent ;
var escape = typeof options . escape === 'function'
? options . escape
: identity ;
var regexString = '.{1,' + width + '}' ;
if ( options . cut !== true ) {
regexString += '([\\s\u200B]+|$)|[^\\s\u200B]+?([\\s\u200B]+|$)' ;
}
var re = new RegExp ( regexString , 'g' );
var lines = str . match ( re ) || [];
var result = indent + lines . map ( function ( line ) {
if ( line . slice ( - 1 ) === '\n' ) {
line = line . slice ( 0 , line . length - 1 );
}
return escape ( line );
}). join ( newline );
if ( options . trim === true ) {
result = result . replace ( /[ \t]*$/gm , '' );
}
return result ;
};
function identity ( str ) {
return str ;
}
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings