Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
define("core_ai/helper",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default=
2
/**
3
   * The helper module or AI Subsystem.
4
   *
5
   * @module     core_ai/helper
6
   * @copyright  2024 Huong Nguyen <huongnv13@gmail.com>
7
   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
8
   */
9
class{static replaceLineBreaks(text){const textWithBreaks=text.replace(/\n{2,}|\r\n/g,"<br/><br/>").replace(/\n/g,"<br/>");return"<p>".concat(textWithBreaks,"</p>")}static replaceMarkdown(text){return text.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>")}static formatResponse(text){let formattedText=this.replaceLineBreaks(text);return formattedText=this.replaceMarkdown(formattedText),formattedText}},_exports.default}));
10
 
11
//# sourceMappingURL=helper.min.js.map