mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 23:37:15 +00:00
1 parent
03661eef9e
commit
f326ca5ae5
8 files changed
+75
-45
No files matched your search
@@ -0,0 +1,21 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
|
||||
/**
|
||||
* ln2br - A filter to convert line feeds and carriage returns to html line breaks
|
||||
* @memberof SOGo.Common
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
function ln2br() {
|
||||
return function(text) {
|
||||
return text ? String(text).replace(/\r?\n/gm, '<br>') : undefined;
|
||||
};
|
||||
}
|
||||
|
||||
angular.module('SOGo.Common')
|
||||
.filter('ln2br', ln2br);
|
||||
})();
|
||||
Reference in new issue
Block a user