Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

define("core_ai/helper",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default=
/**
   * The helper module or AI Subsystem.
   *
   * @module     core_ai/helper
   * @copyright  2024 Huong Nguyen <huongnv13@gmail.com>
   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
   */
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}));

//# sourceMappingURL=helper.min.js.map