/
githubmirror
/
edx-platform
Обзор
Документация
Войти
/
githubmirror
/
edx-platform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
release-ulmo
lms/static/js/edxnotes/utils/utils.js
26 строк
709 B
Syed Ali Abbas Zaidi
chore: apply amnesty on existing not fixable issues (#32215)
07 авг 2023, 17:13
Не верифицирован
07 авг 2023, 17:13
8480dbc
Код
Авторство
О чём код?
// eslint-disable-next-line no-shadow-restricted-names (function(define, undefined) { 'use strict'; define([], function($, _) { /** * Replaces all newlines in a string by HTML line breaks. * @param {String} str The input string. * @return `String` with '<br>' instead all newlines (\r\n, \n\r, \n and \r). * @example * nl2br("This\r\nis\n\ra\nstring\r") * Output: * This<br> * is<br> * a<br> * string<br> */ var nl2br = function(str) { return (str + '').replace(/(\r\n|\n\r|\r|\n)/g, '<br>'); }; return { nl2br: nl2br }; }); }).call(this, define || RequireJS.define);